78% css-javascript-toolbox

Code Review | CSS & JavaScript Toolbox

WordPress plugin CSS & JavaScript Toolbox scored78%from 54 tests.

About plugin

  • Plugin page: css-javascript-to...
  • Plugin version: 11.7
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 19, 2011
  • Latest release: Jun 20, 2023
  • Number of updates: 222
  • Update frequency: every 19.4 days
  • Top authors: wipeoutmedia (70.27%)xpointer (29.73%)

Code review

54 tests

User reviews

85 reviews

Install metrics

10,000+ active /440,443 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.09MB] [CPU: ▲1.27ms] Passed 4 tests

Analyzing server-side resources used by CSS & JavaScript Toolbox
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.07 ▲0.6041.98 ▲5.10
Dashboard /wp-admin4.57 ▲1.2657.90 ▲8.45
Posts /wp-admin/edit.php4.61 ▲1.2551.00 ▲1.11
Add New Post /wp-admin/post-new.php7.16 ▲1.2788.60 ▼9.59
Media Library /wp-admin/upload.php4.50 ▲1.2744.28 ▲9.21

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 650 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for CSS & JavaScript Toolbox
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,862 ▲10114.68 ▲0.341.72 ▲0.0944.15 ▲4.33
Dashboard /wp-admin2,268 ▲915.64 ▼0.0285.61 ▼2.8471.00 ▲27.42
Posts /wp-admin/edit.php2,173 ▲732.05 ▲0.0234.91 ▼1.8438.05 ▲3.58
Add New Post /wp-admin/post-new.php1,593 ▲6723.59 ▲0.34778.38 ▲95.8355.14 ▼1.70
Media Library /wp-admin/upload.php1,476 ▲794.25 ▲0.0396.43 ▼4.8380.42 ▲35.91

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please fix the following items
  • 149× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/css-javascript-toolbox/tables/parameter-typedef.php
    • > /wp-content/plugins/css-javascript-toolbox/includes/installer/upgrade/1.1-CE/upgrade.class.php
    • > /wp-content/plugins/css-javascript-toolbox/includes/installer/upgrade/0.3/includes/block.class.php
    • > /wp-content/plugins/css-javascript-toolbox/tables/blocks.php
    • > /wp-content/plugins/css-javascript-toolbox/framework/developer/interface/block/shortcode/parameters/types/raw.php
    • > /wp-content/plugins/css-javascript-toolbox/controllers/block.php
    • > /wp-content/plugins/css-javascript-toolbox/controllers/auto-upgrade.php
    • > /wp-content/plugins/css-javascript-toolbox/framework/developer/interface/block/parameters/types/base/abstract.php
    • > /wp-content/plugins/css-javascript-toolbox/views/setup/setup/view.php
    • > /wp-content/plugins/css-javascript-toolbox/framework/developer/interface/block/parameters/types/list.php
  • 145× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'CJT_Models_Package_Xml_Definition_Interface_Element' not found in wp-content/plugins/css-javascript-toolbox/models/package/xml/definition/abstract.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'CJT_Models_Package_Xml_Definition_Frag_Frag_Block_Files_File' not found in wp-content/plugins/css-javascript-toolbox/models/package/xml/definition/package/package/block/files/file.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'CJT_Models_Package_Xml_Definition_Abstract' not found in wp-content/plugins/css-javascript-toolbox/models/package/xml/definition/package/package/objects.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'cssJSToolbox' not found in wp-content/plugins/css-javascript-toolbox/views/extensions/plugins-list/public/js/plugins/plugins.localization.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CJT_Framework_Html_Dom_Elementbase' not found in wp-content/plugins/css-javascript-toolbox/framework/html/dom/element/script.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'cssJSToolbox' not found in wp-content/plugins/css-javascript-toolbox/views/blocks/manager/public/js/blocks-page/blocks-page.localization.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CJT_Models_Package_Xml_Definition_Abstract' not found in wp-content/plugins/css-javascript-toolbox/models/package/xml/definition/frag/frag/block/params/form/groups.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'CJT_Models_Package_Xml_Definition_Abstract' not found in wp-content/plugins/css-javascript-toolbox/models/package/xml/definition/frag/frag/block/params/form/groups/group/xfields.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'cssJSToolbox' not found in wp-content/plugins/css-javascript-toolbox/views/blocks/metabox/public/js/metabox/metabox.localization.php:13
    • > PHP Warning
      Use of undefined constant CJTOOLBOX_FRAMEWORK - assumed 'CJTOOLBOX_FRAMEWORK' (this will throw an Error in a future version of PHP) in wp-content/plugins/css-javascript-toolbox/models/settings/metabox.php on line 5

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Requires at least: Invalid version format
  • Requires php: Invalid version format
Please take inspiration from this readme.txt

css-javascript-toolbox/css-js-toolbox.php 92% from 13 tests

The entry point to "CSS & JavaScript Toolbox" version 11.7 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("css-javascript-toolbox.php" instead of "css-js-toolbox.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin31,411 lines of code in 496 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript711,34013,50016,234
PHP3793,54714,67912,639
CSS311811431,623
SQL959104487
PO File1155187384
HTML10015
SVG11011
JSON20010
XML1008

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity3.82
▷ Minimum class complexity1.00
▷ Maximum class complexity54.00
Average method complexity1.76
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces1
Interfaces9
Traits0
Classes325
▷ Abstract classes5115.69%
▷ Concrete classes27484.31%
▷ Final classes10.36%
Methods1,287
▷ Static methods1108.55%
▷ Public methods1,10385.70%
▷ Protected methods17613.68%
▷ Private methods80.62%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants193
▷ Global constants7337.82%
▷ Class constants12062.18%
▷ Public constants120100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
77 PNG files occupy 0.22MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
views/blocks/manager/public/images/toolbox/revert-state.png3.33KB1.30KB▼ 61.06%
framework/css/images/beautify.png2.57KB0.76KB▼ 70.35%
framework/css/images/font-large.png2.07KB0.52KB▼ 74.94%
views/blocks/block/public/images/toolbox/info.png2.36KB0.80KB▼ 65.89%
views/blocks/manager/public/images/css-js-toolbox-logo.png12.73KB4.45KB▼ 65.04%