Coder Social home page Coder Social logo

markjivko / wordpress-code-review Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 376 KB

Automatic WordPress plugin review tool

Home Page: https://potrivit.com

License: GNU General Public License v3.0

PHP 76.99% CSS 10.06% HTML 8.06% JavaScript 4.88%
php-code-review wordpress-code-review cybersecurity php-cybersecurity wordpress-cybersecurity code-review markjivko

wordpress-code-review's Introduction

WordPress Code Review

Generate Quality Assurance tests for public WordPress plugins and store them as static HTML pages.

Install procedure

Install the required packages (LAMP stack & PHPMyAdmin)

sudo apt-get install -y apache2 mysql-server php7.4 php-sqlite3 curl phpmyadmin chromium-browser wpcloc pngquant subversion

Store the phpmyadmin password in "./app/config/config.ini"/

Install chrome and chromedriver

sudo apt-get install unzip && a=$(uname -m) && rm -r /tmp/chromedriver/
mkdir /tmp/chromedriver/ &&
wget -O /tmp/chromedriver/LATEST_RELEASE http://chromedriver.storage.googleapis.com/LATEST_RELEASE &&
if [ $a == i686 ]; then b=32; elif [ $a == x86_64 ]; then b=64; fi &&
latest=$(cat /tmp/chromedriver/LATEST_RELEASE) &&
wget -O /tmp/chromedriver/chromedriver.zip 'http://chromedriver.storage.googleapis.com/'$latest'/chromedriver_linux'$b'.zip' &&
sudo unzip /tmp/chromedriver/chromedriver.zip chromedriver -d /usr/local/bin/

Store your user and group by running the following commands as yourself (not root) from inside the project folder (same level as run.php)

sed -i -E "s/\buser\s*=\s*.*$/user = \"$(whoami)\"/" "./app/config/config.ini"

sed -i -E "s/\bgroup\s*=\s*.*$/group = \"$(id -g -n)\"/" "./app/config/config.ini"

Run the installer as root

sudo php -f run.php install

You can now use wp commands which support chaining (wp first && wp second)

Common commands

Plugins:

  • Remove all plugins: wp plugin purge
  • Install a plugin: wp plugin install {plugin-slug}
  • Uninstall a plugin: wp plugin uninstall {plugin-slug}
  • Activate a plugin: wp plugin activate {plugin-slug}
  • Deactivate a plugin: wp plugin deactivate {plugin-slug}

Tests:

  • Run test suites on a plugin: wp test run {plugin-slug}
  • Render all assets and listings: wp render
  • Purge all references: wp render run purge

Batch:

  • Test newly added plugins: wp batch new [{limit}]
  • Test updated plugins: wp batch updates [{limit}]
  • Re-test local plugins: wp batch local [{limit}]

wordpress-code-review's People

Contributors

markjivko avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.