78% gonzales

Code Review | Wordpress Assets manager, dequeue scripts, dequeue styles

WordPress plugin Wordpress Assets manager, dequeue scripts, dequeue styles scored78%from 54 tests.

About plugin

  • Plugin page: gonzales
  • Plugin version: 2.1.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4
  • WordPress version: 6.3.1
  • First release: Nov 29, 2017
  • Latest release: Nov 23, 2023
  • Number of updates: 28
  • Update frequency: every 78.0 days
  • Top authors: alexkovalevv (60.71%)webcraftic (39.29%)creativemotion (7.14%)

Code review

54 tests

User reviews

50 reviews

Install metrics

4,000+ active /61,423 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲1.42MB] [CPU: ▲12.14ms] Passed 4 tests

An overview of server-side resources used by Wordpress Assets manager, dequeue scripts, dequeue styles
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.42 ▲0.9543.43 ▼0.88
Dashboard /wp-admin4.89 ▲1.5972.51 ▲24.10
Posts /wp-admin/edit.php4.93 ▲1.5765.02 ▲16.55
Add New Post /wp-admin/post-new.php7.48 ▲1.5999.54 ▲11.92
Media Library /wp-admin/upload.php4.80 ▲1.5756.72 ▲20.96
Assets manager /wp-admin/options-general.php?page=gonzales-wbcr_gonzales5.62329.21

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

How much does this plugin use your filesystem and database?
These are issues you should consider
  • There were 1 file (14.40KB) illegally modified outside of "wp-content/plugins/gonzales/" and "wp-content/uploads/"
    • (new file) wp-content/mu-plugins/assets-manager.php
Filesystem: 279 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
wbcr_gnz_plugin_activated
wbcr_gnz_plugin_version
theysaidso_admin_options

Browser metrics Passed 4 tests

Wordpress Assets manager, dequeue scripts, dequeue styles: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,856 ▲9414.25 ▼0.071.67 ▲0.0336.45 ▼9.06
Dashboard /wp-admin2,255 ▲845.66 ▲0.0994.80 ▲0.8839.05 ▼7.75
Posts /wp-admin/edit.php2,164 ▲612.04 ▲0.0642.19 ▲1.8235.92 ▲0.58
Add New Post /wp-admin/post-new.php1,561 ▲2623.47 ▼1.32616.84 ▲19.6833.77 ▼40.69
Media Library /wp-admin/upload.php1,440 ▲404.16 ▼0.02101.03 ▲6.0143.33 ▼0.69
Assets manager /wp-admin/options-general.php?page=gonzales-wbcr_gonzales1,2272.3238.6838.28

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • 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-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 8× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/gonzales/views/part-assets-manager-tabs-menu.php
    • > /wp-content/plugins/gonzales/views/part-assets-manager-info-bar.php
    • > /wp-content/plugins/gonzales/views/tab-content-assets-plugins.php
    • > /wp-content/plugins/gonzales/views/part-tab-content-assets-plugins-settings.php
    • > /wp-content/plugins/gonzales/views/part-assets-manager-header.php
    • > /wp-content/plugins/gonzales/views/tab-content-assets.php
    • > /wp-content/plugins/gonzales/views/assets-manager.php
    • > /wp-content/plugins/gonzales/views/conditions-logic-editor-template.php
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Wbcr_Factory473_Update' not found in wp-content/plugins/gonzales/migrations/010108.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WBCR\\Factory_Templates_126\\Pages\\Step' not found in wp-content/plugins/gonzales/libs/factory/templates/pages/setup-parts/class-step-form.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Wbcr_Factory473_Update' not found in wp-content/plugins/gonzales/migrations/010100.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WBCR\\Factory_Templates_126\\Pages\\Step' not found in wp-content/plugins/gonzales/libs/factory/templates/pages/setup-parts/class-step-custom.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Wbcr_FactoryForms469_FontControl' not found in wp-content/plugins/gonzales/libs/factory/forms/controls/google-font.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Wbcr_Factory473_Update' not found in wp-content/plugins/gonzales/migrations/020005.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
The official readme.txt is a good inspiration

gonzales/gonzales.php Passed 13 tests

"Wordpress Assets manager, dequeue scripts, dequeue styles" version 2.1.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
112 characters long description:
Increase the speed of the pages by disabling unused scripts (.JS) and styles (.CSS). Make your website REACTIVE!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin28,025 lines of code in 208 files:
LanguageFilesBlank linesComment linesLines of code
PHP1283,3828,03012,691
CSS322113374,696
JavaScript229455124,213
LESS136781673,277
JSON1001,810
PO File103745291,335
Markdown1102
SVG1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity18.19
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces9
Interfaces2
Traits1
Classes101
▷ Abstract classes1615.84%
▷ Concrete classes8584.16%
▷ Final classes00.00%
Methods754
▷ Static methods293.85%
▷ Public methods54271.88%
▷ Protected methods15320.29%
▷ Private methods597.82%
Functions42
▷ Named functions2150.00%
▷ Anonymous functions2150.00%
Constants67
▷ Global constants5886.57%
▷ Class constants913.43%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
10 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
libs/factory/templates/pages/templates/impressive-lite/assets/img/5-stars22.png3.51KB0.70KB▼ 79.99%
libs/factory/templates/pages/templates/impressive/assets/img/paypal-donate.png12.44KB4.99KB▼ 59.88%
libs/factory/templates/pages/templates/impressive-lite/assets/img/webcraftic-plugin-icon.png1.97KB0.75KB▼ 61.79%
libs/factory/templates/pages/templates/impressive/assets/img/5-stars22.png3.51KB0.70KB▼ 79.99%
assets/img/cancel.png0.42KB0.22KB▼ 47.82%