67% plug-and-play

Code Review | Plug & Play

WordPress plugin Plug & Play scored 67% from 54 tests.

About plugin

  • Plugin page: plug-and-play
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.0-4.5.3
  • WordPress version: 6.3.1
  • First release: Feb 3, 2016
  • Latest release: Jul 11, 2016
  • Number of updates: 9
  • Update frequency: every 17.7 days
  • Top authors: djerba (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 978 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼1.21MB] [CPU: ▼41.42ms] Passed 4 tests

This is a short check of server-side resources used by Plug & Play
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.74 ▼0.7212.91 ▼28.31
Dashboard /wp-admin2.81 ▼0.5019.96 ▼29.50
Posts /wp-admin/edit.php2.81 ▼0.5516.02 ▼28.87
Add New Post /wp-admin/post-new.php2.81 ▼3.0815.66 ▼79.01
Media Library /wp-admin/upload.php2.81 ▼0.4214.81 ▼20.09
/wp-admin/admin.php?page=plug-and-play--menu2.8118.48

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
can_compress_scripts
bPressSignature
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
bPressServices

Browser metrics Passed 4 tests

Plug & Play: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,010 ▲27515.65 ▲1.2227.23 ▲25.2960.83 ▲13.58
Dashboard /wp-admin2,251 ▲634.97 ▲0.06101.82 ▼15.7676.25 ▲31.80
Posts /wp-admin/edit.php2,134 ▲452.24 ▲0.2235.28 ▼2.4534.33 ▲2.36
Add New Post /wp-admin/post-new.php1,551 ▲3417.59 ▼0.02740.79 ▲86.8837.15 ▼10.37
Media Library /wp-admin/upload.php1,427 ▲364.31 ▲0.1096.06 ▼2.2567.37 ▲23.66
/wp-admin/admin.php?page=plug-and-play--menu8771.8428.6125.95

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/plug-and-play/bPress/WP2P.class.php+322
    count(): Parameter must be an array or an object that implements Countable
  • The uninstall procedure has failed, leaving 8 options in the database
    • bPressSignature
    • bPressServices
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=plug-and-play--menu
    • > Warning in wp-content/plugins/plug-and-play/bPress/WP2P.class.php+297
    count(): Parameter must be an array or an object that implements Countable
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=plug-and-play--menu
    • > Notice in wp-content/plugins/plug-and-play/bPress/WP2P.class.php+298
    Uninitialized string offset: 0
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=plug-and-play--menu
    • > Warning in wp-content/plugins/plug-and-play/bPress/WP2P.class.php+298
    Illegal string offset 'category'
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=plug-and-play--menu
    • > Warning in wp-content/plugins/plug-and-play/bPress/WP2P.class.php+298
    Illegal string offset 'title'
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=plug-and-play--menu
    • > Notice in wp-content/plugins/plug-and-play/bPress/WP2P.class.php+310
    Undefined variable: serviceIndex
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=plug-and-play--menu
    • > Notice in wp-content/plugins/plug-and-play/bPress/WP2P.class.php+310
    String offset cast occurred
    • > GET request to /wp-admin/admin.php?page=plug-and-play--menu
    • > Warning in wp-content/plugins/plug-and-play/bPress/WP2P.class.php+74
    Illegal string offset 'products'
    • > GET request to /wp-admin/admin.php?page=plug-and-play--menu
    • > Warning in wp-content/plugins/plug-and-play/bPress/WP2P.class.php+307
    Illegal string offset 'name'

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/plug-and-play/bPress/WP2P.class.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Maintenance Mode Configuration), #2 (Maintenance Mode live), #3 (Versus), #4 (Login Logo)
The official readme.txt might help

plug-and-play/index.php 85% from 13 tests

Analyzing the main PHP file in "Plug & Play" version 1.2
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("plug-and-play.php" instead of "index.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 142 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin1,608 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript354180698
PHP24789526
CSS181214
PO File36167170

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity87.00
▷ Minimum class complexity87.00
▷ Maximum class complexity87.00
Average method complexity6.12
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
9 PNG files occupy 1.49MB with 0.90MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
bPress/images/16.png1.47KB0.68KB▼ 53.88%
screenshot-3.png296.67KB77.08KB▼ 74.02%
bPress/images/32.png2.29KB1.31KB▼ 42.82%
bPress/images/wp-live-support.png5.12KB1.76KB▼ 65.71%
bPress/images/plug-and-play.png4.91KB1.75KB▼ 64.38%