83% plugin-version-control

Code Review | Plugin Version Switching

WordPress plugin Plugin Version Switching scored83%from 54 tests.

About plugin

  • Plugin page: plugin-version-co...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.1
  • WordPress version: 6.3.1
  • First release: Jan 12, 2015
  • Latest release: Jan 12, 2015
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: Hudson Atwell (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,065 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼5.77ms] Passed 4 tests

Server-side resources used by Plugin Version Switching
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.16 ▲0.39
Dashboard /wp-admin3.31 ▼0.0343.96 ▼16.81
Posts /wp-admin/edit.php3.43 ▲0.0746.28 ▲5.38
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.19 ▼6.89
Media Library /wp-admin/upload.php3.23 ▲0.0136.33 ▲0.24

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Plugin Version Switching
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.67 ▼0.721.71 ▼0.1441.14 ▼5.21
Dashboard /wp-admin2,206 ▲185.87 ▼0.02111.41 ▼6.8639.76 ▼4.51
Posts /wp-admin/edit.php2,089 ▼02.05 ▼0.0039.34 ▼1.5334.26 ▼2.95
Add New Post /wp-admin/post-new.php1,528 ▼223.20 ▲4.78669.76 ▲37.0660.49 ▲5.56
Media Library /wp-admin/upload.php1,391 ▲34.22 ▲0.05103.12 ▼2.6248.41 ▲4.18

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/plugin-version-control/version-control.php:33
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/plugin-version-control/version-control.php on line 33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/plugin-version-control/classes/class.ajax.replace-plugin.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/plugin-version-control/classes/class.version-control.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Donate link: Please fix this invalid url: "mailto:marketplace@inboundnow.com"
The official readme.txt is a good inspiration

plugin-version-control/version-control.php 69% from 13 tests

"Plugin Version Switching" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("plugin-version-control.php" instead of "version-control.php")
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("lang")
  • Domain Path: Prefix the domain path with a forward slash character ("/lang")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin233 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3108101231
Markdown1002

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity7.67
▷ Minimum class complexity3.00
▷ Maximum class complexity12.00
Average method complexity2.05
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods19
▷ Static methods1684.21%
▷ Public methods1578.95%
▷ Protected methods00.00%
▷ Private methods421.05%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected