73% disable-plugins-on-pages-posts

Code Review | Disable Plugins on Pages Posts (Plugin Load Organizer)

WordPress plugin Disable Plugins on Pages Posts (Plugin Load Organizer) scored73%from 54 tests.

About plugin

  • Plugin page: disable-plugins-o...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.0
  • WordPress version: 6.3.1
  • First release: Aug 16, 2022
  • Latest release: Aug 16, 2022
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: aminnz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /988 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼3.53ms] Passed 4 tests

An overview of server-side resources used by Disable Plugins on Pages Posts (Plugin Load Organizer)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0939.25 ▼1.31
Dashboard /wp-admin3.40 ▲0.0951.81 ▲1.64
Posts /wp-admin/edit.php3.45 ▲0.0950.58 ▲0.68
Add New Post /wp-admin/post-new.php5.98 ▲0.0988.29 ▼15.14
Media Library /wp-admin/upload.php3.32 ▲0.0840.83 ▲4.64
Plugin load organizer /wp-admin/options-general.php?page=bestwp-plugin-organizer3.3138.31

Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
It is recommended to fix the following issues
  • Illegal file modification found: 1 file (3.78KB) outside of "wp-content/plugins/disable-plugins-on-pages-posts/" and "wp-content/uploads/"
    • (new file) wp-content/mu-plugins/bestwpPluginOrganizer.php
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Disable Plugins on Pages Posts (Plugin Load Organizer)
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.65 ▲0.361.63 ▼0.5841.05 ▼6.68
Dashboard /wp-admin2,199 ▲225.64 ▲0.0493.12 ▼0.9043.28 ▼4.05
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0334.79 ▼1.2634.60 ▲0.84
Add New Post /wp-admin/post-new.php1,548 ▲2223.28 ▲5.71680.35 ▼24.7155.12 ▼8.67
Media Library /wp-admin/upload.php1,404 ▲44.23 ▼0.00107.06 ▼9.8146.33 ▼4.00
Plugin load organizer /wp-admin/options-general.php?page=bestwp-plugin-organizer9091.7726.3326.93

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'pluginUninstallation' not found or invalid function name
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant BESTWP_PLO_PLUGIN_DIR - assumed 'BESTWP_PLO_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/disable-plugins-on-pages-posts/plugin-load-organizer.php on line 4
    • > PHP Warning
      include_once(BESTWP_PLO_PLUGIN_DIR/inc/options.php): failed to open stream: No such file or directory in wp-content/plugins/disable-plugins-on-pages-posts/plugin-load-organizer.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_url() in wp-content/plugins/disable-plugins-on-pages-posts/mu-plugins/bestwpPluginOrganizer.php:6
    • > PHP Warning
      include_once(): Failed opening 'BESTWP_PLO_PLUGIN_DIR/inc/options.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/disable-plugins-on-pages-posts/plugin-load-organizer.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/disable-plugins-on-pages-posts/index.php:17

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
1 plugin tags: plugin organizer

disable-plugins-on-pages-posts/index.php 77% from 13 tests

"Disable Plugins on Pages Posts (Plugin Load Organizer)" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("disable-plugins-on-pages-posts.php" instead of "index.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.0" instead of "5.4")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin626 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP410119393
CSS2516138
JavaScript2101695

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity13.00
▷ Minimum class complexity10.00
▷ Maximum class complexity16.00
Average method complexity2.85
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods17.69%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin