68% participad

Code Review | Participad

WordPress plugin Participad scored68%from 54 tests.

About plugin

  • Plugin page: participad
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.6
  • WordPress version: 6.3.1
  • First release: Oct 24, 2012
  • Latest release: May 28, 2013
  • Number of updates: 13
  • Update frequency: every 18.3 days
  • Top authors: boonebgorges (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /4,607 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼1.92MB] [CPU: ▼59.10ms] Passed 4 tests

Server-side resources used by Participad
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.394.45 ▼40.75
Dashboard /wp-admin2.10 ▼1.257.09 ▼50.07
Posts /wp-admin/edit.php2.10 ▼1.265.88 ▼47.21
Add New Post /wp-admin/post-new.php2.10 ▼3.795.47 ▼98.35
Media Library /wp-admin/upload.php2.10 ▼1.135.26 ▼29.79
Participad /wp-admin/options-general.php?page=participad2.106.64

Server storage [IO: ▲0.08MB] [DB: ▲0.00MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Participad
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲6713.44 ▼0.861.69 ▼0.2739.87 ▼9.33
Dashboard /wp-admin2,219 ▲345.80 ▲0.93102.50 ▼1.2140.78 ▼1.47
Posts /wp-admin/edit.php2,098 ▲92.02 ▲0.0540.00 ▼2.3835.47 ▲0.57
Add New Post /wp-admin/post-new.php1,545 ▲2623.09 ▼0.01673.27 ▲30.7059.35 ▲8.60
Media Library /wp-admin/upload.php1,395 ▲44.22 ▲0.0498.81 ▲0.7141.73 ▲0.27
Participad /wp-admin/options-general.php?page=participad8232.0623.3523.37

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/participad/participad.php+93
    Non-static method Participad::instance() should not be called statically
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=participad
    • > Deprecated in wp-content/plugins/participad/participad.php+93
    Non-static method Participad::instance() should not be called statically

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Participad_Integration' not found in wp-content/plugins/participad/modules/dashboard/dashboard.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/participad/includes/admin.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Participad_Integration' not found in wp-content/plugins/participad/modules/notepad/notepad.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/participad/modules/notepad/widgets.php:14
    • > PHP Fatal error
      require(): Failed opening required 'PARTICIPAD_PLUGIN_DIRlib/etherpad-lite-client.php' (include_path='.:/usr/share/php') in wp-content/plugins/participad/includes/class-participad-client.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/participad/modules/notepad/bp-integration.php:73
    • > PHP Fatal error
      Uncaught Error: Class 'Participad_Integration' not found in wp-content/plugins/participad/modules/frontend/frontend.php:16
    • > PHP Warning
      Use of undefined constant PARTICIPAD_PLUGIN_DIR - assumed 'PARTICIPAD_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/participad/includes/class-participad-client.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/participad/participad.php:95
    • > PHP Warning
      require(PARTICIPAD_PLUGIN_DIRlib/etherpad-lite-client.php): failed to open stream: No such file or directory in wp-content/plugins/participad/includes/class-participad-client.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
10 plugin tags: real time, live, synchronous, google docs, etherpad...

participad/participad.php Passed 13 tests

"Participad" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
92 characters long description:
Real time collaboration in WordPress, through integration with an Etherpad Lite installation

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,530 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP134077471,423
JavaScript315777
Markdown110017
CSS21013

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity13.36
▷ Minimum class complexity9.00
▷ Maximum class complexity25.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes19.09%
▷ Concrete classes1090.91%
▷ Final classes00.00%
Methods110
▷ Static methods98.18%
▷ Public methods10595.45%
▷ Protected methods54.55%
▷ Private methods00.00%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants225.00%
▷ Class constants675.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin