77% cssjockey-add-ons

Code Review | WP Builder

WordPress plugin WP Builder scored77%from 54 tests.

About plugin

  • Plugin page: cssjockey-add-ons
  • Plugin version: 3.0.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Jul 18, 2014
  • Latest release: Oct 20, 2021
  • Number of updates: 124
  • Update frequency: every 21.4 days
  • Top authors: cssjockey (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

40+ active /12,279 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.44MB] [CPU: ▲24.26ms] Passed 4 tests

An overview of server-side resources used by WP Builder
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.32 ▲0.8636.95 ▼3.51
Dashboard /wp-admin4.94 ▲1.6488.24 ▲40.88
Posts /wp-admin/edit.php5.01 ▲1.6577.95 ▲31.03
Add New Post /wp-admin/post-new.php7.74 ▲1.86120.00 ▲34.59
Media Library /wp-admin/upload.php4.82 ▲1.5971.30 ▲34.92
WP Builder Cloud /wp-admin/admin.php?page=cjwpbldr-cloud-redirect4.7356.85
WP Builder /wp-admin/admin.php?page=cjwpbldr4.7361.32

Server storage [IO: ▲22.78MB] [DB: ▲0.08MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 707 new files
Database: no new tables, 9 new options
New WordPress options
cjwpbldr_globals_sidebars
db_upgraded
cjwpbldr_api_token
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
_cjwpbldr_options_

Browser metrics Passed 4 tests

Checking browser requirements for WP Builder
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,948 ▲1,21323.99 ▲9.31110.62 ▲108.6533.58 ▼15.91
Dashboard /wp-admin2,731 ▲5469.63 ▲3.79188.15 ▲69.3566.72 ▲20.83
Posts /wp-admin/edit.php2,664 ▲5756.96 ▲4.92100.39 ▲62.4060.33 ▲25.27
Add New Post /wp-admin/post-new.php1,766 ▲23123.89 ▲0.80663.69 ▼38.1748.93 ▼6.96
Media Library /wp-admin/upload.php1,780 ▲3897.10 ▲2.90123.56 ▲23.0287.65 ▲43.09
WP Builder Cloud /wp-admin/admin.php?page=cjwpbldr-cloud-redirect1,5957.0498.48109.36
WP Builder /wp-admin/admin.php?page=cjwpbldr1,7807.04100.71102.18

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 9 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • cjwpbldr_api_token
    • theysaidso_admin_options
    • widget_recent-posts
    • _cjwpbldr_options_
    • cjwpbldr_globals_sidebars

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 24× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/cssjockey-add-ons/framework/lib/gump/examples/street_address.php
    • > /wp-content/plugins/cssjockey-add-ons/framework/lib/gump/examples/noise_words.php
    • > /wp-content/plugins/cssjockey-add-ons/framework/html/nav-menu-items/button.php
    • > /wp-content/plugins/cssjockey-add-ons/framework/lib/gump/examples/files.php
    • > /wp-content/plugins/cssjockey-add-ons/framework/lib/gump/examples/url_exists.php
    • > /wp-content/plugins/cssjockey-add-ons/framework/lib/gump/examples/guid.php
    • > /wp-content/plugins/cssjockey-add-ons/framework/admin-pages/core-cloud.php
    • > /wp-content/plugins/cssjockey-add-ons/framework/html/nav-menu-items/social-link.php
    • > /wp-content/plugins/cssjockey-add-ons/framework/lib/gump/examples/explicit_fields.php
    • > /wp-content/plugins/cssjockey-add-ons/framework/lib/gump/tests.php
  • 271× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: classes in wp-content/plugins/cssjockey-add-ons/framework/html/nav-menu-items/button.php on line 13
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cssjockey-add-ons/framework/html/forms/jquery/parts/set-password.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_hookup' not found in wp-content/plugins/cssjockey-add-ons/framework/lib/cmb2/includes/CMB2_Options_Hookup.php:14
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cssjockey-add-ons/framework/ui-blocks.css.php:28
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/cssjockey-add-ons/framework/html/nav-menu-items/logo.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cssjockey-add-ons/framework/admin-pages/install-themes/step-3.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/cssjockey-add-ons/framework/lib/cmb2/includes/types/CMB2_Type_Picker_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Formatter' not found in wp-content/plugins/cssjockey-add-ons/framework/lib/vendor/scssphp/scssphp/src/Formatter/Compressed.php:22
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/cssjockey-add-ons/framework/html/parts/admin-form-css-styles.php on line 5
    • > PHP Notice
      Trying to get property 'before' of non-object in wp-content/plugins/cssjockey-add-ons/framework/html/nav-menu-items/social-link.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5, #6, #7, #8 in cssjockey-add-ons/assets to your readme.txt
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

cssjockey-add-ons/init.php 77% from 13 tests

Analyzing the main PHP file in "WP Builder" version 3.0.7
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 322 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("cssjockey-add-ons.php" instead of "init.php")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected130,872 lines of code in 575 files:
LanguageFilesBlank linesComment linesLines of code
PHP2918,65414,00752,276
JavaScript413,8203,67631,740
Sass1884,27524527,704
SVG80149,162
CSS251,2711,2005,109
JSON11002,221
PO File19879921,991
Markdown82510626
YAML10031
HTML10012

PHP code 0% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
These items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 1,087)
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 190)
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity43.28
▷ Minimum class complexity1.00
▷ Maximum class complexity1,087.00
Average method complexity4.90
▷ Minimum method complexity1.00
▷ Maximum method complexity190.00
Code structure
Namespaces12
Interfaces1
Traits15
Classes152
▷ Abstract classes138.55%
▷ Concrete classes13991.45%
▷ Final classes00.00%
Methods1,829
▷ Static methods1618.80%
▷ Public methods1,28570.26%
▷ Protected methods52528.70%
▷ Private methods191.04%
Functions171
▷ Named functions3621.05%
▷ Anonymous functions13578.95%
Constants86
▷ Global constants1112.79%
▷ Class constants7587.21%
▷ Public constants75100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
60 PNG files occupy 0.10MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
framework/lib/cmb2/apigen/theme-bootstrap/src/resources/collapsed.png0.24KB0.14KB▼ 41.77%
assets/css/images/colorpicker/colorpicker_hsb_s.png1.14KB0.80KB▼ 29.97%
framework/lib/cmb2/apigen/theme-bootstrap/src/resources/tree-cleaner.png0.12KB0.08KB▼ 33.33%
assets/css/images/colorpicker/colorpicker_rgb_b.png0.95KB0.76KB▼ 19.48%
assets/css/images/raster_dot.png0.08KB0.10KB0.00%