84% disable-plugins-scripts

Code Review | Disable JS & CSS of Plugins

WordPress plugin Disable JS & CSS of Plugins scored84%from 54 tests.

About plugin

  • Plugin page: disable-plugins-s...
  • Plugin version: 1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-5.4
  • WordPress version: 6.3.1
  • First release: Jun 5, 2020
  • Latest release: Jun 5, 2020
  • Number of updates: 2
  • Update frequency: every 23.0 days
  • Top authors: anhtuanh_1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /353 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.05MB] [CPU: ▼6.88ms] Passed 4 tests

Analyzing server-side resources used by Disable JS & CSS of Plugins
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0739.64 ▼2.32
Dashboard /wp-admin3.35 ▲0.0547.70 ▼6.19
Posts /wp-admin/edit.php3.40 ▲0.0449.10 ▼7.65
Add New Post /wp-admin/post-new.php5.95 ▲0.0685.47 ▼11.37
Media Library /wp-admin/upload.php3.27 ▲0.0440.63 ▲2.42
Disable JS & CSS /wp-admin/options-general.php?page=ath-hide-scripts3.2635.77

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Disable JS & CSS of Plugins
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,524 ▲75214.21 ▼0.244.52 ▲2.3841.48 ▼1.08
Dashboard /wp-admin2,304 ▲1276.02 ▲0.4491.07 ▼1.6641.13 ▼5.64
Posts /wp-admin/edit.php2,215 ▲1122.29 ▲0.2440.85 ▲0.1835.41 ▼4.16
Add New Post /wp-admin/post-new.php1,532 ▲623.59 ▲0.42657.51 ▲15.1853.74 ▼7.90
Media Library /wp-admin/upload.php1,515 ▲1184.80 ▲0.51106.74 ▲3.7244.99 ▲2.43
Disable JS & CSS /wp-admin/options-general.php?page=ath-hide-scripts1,1592.1630.0325.30

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Disable_Plugins_Scripts_Configs' not found in wp-content/plugins/disable-plugins-scripts/class-disable-plugins-scripts-main.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Disable_Plugins_Scripts_Main' not found in wp-content/plugins/disable-plugins-scripts/templates/page.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/disable-plugins-scripts/ath-disable-plugins-scripts.php:26

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
There were not plugin tags detected

disable-plugins-scripts/ath-disable-plugins-scripts.php 92% from 13 tests

"Disable JS & CSS of Plugins" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("disable-plugins-scripts.php" instead of "ath-disable-plugins-scripts.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 plugin8,379 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript12,3902,4248,081
PHP647112287
Markdown12010
CSS1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity7.67
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants7
▷ Global constants7100.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
No PNG files were detected