79% disabler

Code Review | Disabler

WordPress plugin Disabler scored 79% from 54 tests.

About plugin

  • Plugin page: disabler
  • Plugin version: 3.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-4.9.5
  • WordPress version: 5.9.2
  • First release: Jul 11, 2010
  • Latest release: Apr 24, 2018
  • Number of updates: 74
  • Update frequency: every 38.5 days
  • Top authors: Ipstenu (78.38%)saas (17.57%)jesin (6.76%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active / 22,727 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.43MB] [CPU: ▼238.03ms] Passed 4 tests

An overview of server-side resources used by Disabler
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.95 ▲0.43134.36 ▲83.43
Dashboard /wp-admin3.87 ▲0.46107.95 ▲68.70
Posts /wp-admin/edit.php4.08 ▲0.45109.95 ▲72.11
Add New Post /wp-admin/post-new.php7.34 ▲0.37167.10 ▼1,114.42
Media Library /wp-admin/upload.php3.75 ▲0.4644.16 ▲21.50
Disabler /wp-admin/options-general.php?page=disabler-settings3.7397.26

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 38 new files
Database: no new tables, 3 new options
New WordPress options
disabler_version
disabler_db_version
disabler_admin_notices

Browser metrics Passed 4 tests

Checking browser requirements for Disabler
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,825 ▲8316.02 ▲0.376.04 ▼0.342.60 ▲0.35
Dashboard /wp-admin2,923 ▲696.09 ▼0.06118.79 ▼29.14160.55 ▼207.42
Posts /wp-admin/edit.php2,721 ▲273.24 ▲0.0066.88 ▲2.14146.86 ▲0.05
Add New Post /wp-admin/post-new.php1,681 ▲2020.72 ▼1.56402.61 ▼8.63163.44 ▲9.74
Media Library /wp-admin/upload.php1,728 ▲305.56 ▲0.03157.31 ▲2.89189.14 ▲5.42
Disabler /wp-admin/options-general.php?page=disabler-settings1,2002.7554.46129.42

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 1 option in the database
    • disabler_admin_notices

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 items
  • 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/disabler/inc/logger/functions-logger.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'Disabler\\Disabler_Collection' not found in wp-content/plugins/disabler/admin/tracking/class-tracking-default-data.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Disabler\\Disabler_Collection' not found in wp-content/plugins/disabler/admin/tracking/class-tracking-plugin-data.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Disabler\\wp_upload_dir() in wp-content/plugins/disabler/inc/class-disabler.php:189
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/disabler/uninstall.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Disabler\\Disabler_Collection' not found in wp-content/plugins/disabler/admin/tracking/class-tracking-theme-data.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Disabler\\plugin() in wp-content/plugins/disabler/inc/logger/logger-init.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/disabler/admin/tracking/tracking-functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/disabler/inc/frontend/functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Disabler\\add_action() in wp-content/plugins/disabler/admin/class-settings.php:35

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=disabler-settings
    • > Network (severe)
    wp-content/plugins/disabler/assets/css/admin/admin-notices.min.css?ver=1524575762 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: options, disable, features

disabler/disabler.php Passed 13 tests

Analyzing the main PHP file in "Disabler" version 3.0.3
103 characters long description:
Instead of installing million plugins to turn off features you don't want, why not use just ONE plugin?

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
There were no executable files found in this plugin2,102 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP367211,9312,102

PHP code Passed 2 tests

Analyzing 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.32
Average class complexity10.14
▷ Minimum class complexity1.00
▷ Maximum class complexity35.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces1
Interfaces3
Traits0
Classes19
▷ Abstract classes526.32%
▷ Concrete classes1473.68%
▷ Final classes321.43%
Methods194
▷ Static methods5829.90%
▷ Public methods11961.34%
▷ Protected methods4925.26%
▷ Private methods2613.40%
Functions36
▷ Named functions36100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants323.08%
▷ Class constants1076.92%
▷ Public constants10100.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