84% just-disable-it

Code Review | Just Disable It

WordPress plugin Just Disable It scored84%from 54 tests.

About plugin

  • Plugin page: just-disable-it
  • Plugin version: 1.1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Sep 26, 2023
  • Latest release: Sep 26, 2023
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: zacscottau (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /34 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

A check of server-side resources used by Just Disable It
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0546.83 ▲4.87
Dashboard /wp-admin3.41 ▲0.1055.81 ▼1.02
Posts /wp-admin/edit.php3.46 ▲0.1055.55 ▲5.63
Add New Post /wp-admin/post-new.php5.99 ▲0.1092.93 ▼17.30
Media Library /wp-admin/upload.php3.33 ▲0.1044.37 ▲9.13
Just Disable It /wp-admin/options-general.php?page=just_disable_it3.3240.76

Server storage [IO: ▲0.22MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 37 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Just Disable It
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.35 ▼0.281.81 ▲0.3142.82 ▲1.41
Dashboard /wp-admin2,199 ▲195.49 ▼0.1995.78 ▲3.1542.99 ▲2.54
Posts /wp-admin/edit.php2,101 ▲12.15 ▲0.1635.59 ▼6.5935.28 ▼4.69
Add New Post /wp-admin/post-new.php1,529 ▼2122.96 ▲4.67654.25 ▲39.9067.45 ▼1.56
Media Library /wp-admin/upload.php1,401 ▲14.16 ▼0.02101.23 ▼5.5743.71 ▼4.95
Just Disable It /wp-admin/options-general.php?page=just_disable_it1,1372.0328.1440.42

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'JustDisableIt\\Model\\SettingModel' not found in wp-content/plugins/just-disable-it/templates/settings/field/checkbox.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/just-disable-it/templates/settings/page.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/just-disable-it/plugin.php:14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Disable features settings page.), #2 (Disable admin menu options.)
You can look at the official readme.txt

just-disable-it/plugin.php 92% from 13 tests

The entry point to "Just Disable It" version 1.1.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("just-disable-it.php" instead of "plugin.php")

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 plugin1,334 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP275255311,313
JSON20012
Markdown1809

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity7.47
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.01
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods110
▷ Static methods1917.27%
▷ Public methods9384.55%
▷ Protected methods1513.64%
▷ Private methods21.82%
Functions16
▷ Named functions16.25%
▷ Anonymous functions1593.75%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.12MB with 0.07MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png52.82KB20.72KB▼ 60.78%
screenshot-2.png66.78KB25.17KB▼ 62.31%