65% workshop-butler

Code Review | Workshop Butler

WordPress plugin Workshop Butler scored65%from 54 tests.

About plugin

  • Plugin page: workshop-butler
  • Plugin version: 3.2.1
  • PHP compatiblity: 7.2.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.2
  • WordPress version: 6.3.1
  • First release: Oct 15, 2016
  • Latest release: Oct 19, 2023
  • Number of updates: 97
  • Update frequency: every 26.4 days
  • Top authors: workshopbutlers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /4,541 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.84MB] [CPU: ▲566.45ms] 50% from 4 tests

Analyzing server-side resources used by Workshop Butler
Please fix the following
  • CPU: Try to keep total CPU usage under 500.00ms (currently 3,743.93ms on /wp-admin/options-general.php?page=WorkshopButler)
  • Extra CPU: The extra CPU usage should be kept under 200.00ms (currently 566.45ms on /wp-admin/options-general.php?page=WorkshopButler)
PageMemory (MB)CPU Time (ms)
Home /4.20 ▲0.7459.64 ▲24.65
Dashboard /wp-admin4.52 ▲1.21965.57 ▲916.18
Posts /wp-admin/edit.php4.25 ▲0.893,908.75 ▲3,861.93
Add New Post /wp-admin/post-new.php6.75 ▲0.87761.81 ▲673.77
Media Library /wp-admin/upload.php4.08 ▲0.85687.16 ▲651.19
Workshop Butler /wp-admin/options-general.php?page=WorkshopButler5.353,743.93

Server storage [IO: ▲9.53MB] [DB: ▲0.14MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 1,244 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
wsb-settings-transients
wsb-internal-settings
widget_wsb_workshop_widget
wsb-settings

Browser metrics Passed 4 tests

Checking browser requirements for Workshop Butler
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,865 ▲10414.35 ▼0.201.73 ▲0.2137.19 ▼0.25
Dashboard /wp-admin2,258 ▲815.55 ▼0.1180.78 ▼14.7838.32 ▼4.55
Posts /wp-admin/edit.php2,101 ▲42.00 ▼0.0233.35 ▼2.6238.72 ▲7.15
Add New Post /wp-admin/post-new.php1,537 ▲918.13 ▼5.12604.84 ▼72.1057.77 ▲0.32
Media Library /wp-admin/upload.php1,407 ▲104.16 ▲0.0189.25 ▼14.2043.29 ▼1.24
Workshop Butler /wp-admin/options-general.php?page=WorkshopButler1,8793.6575.2881.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • wsb-settings-transients
    • can_compress_scripts
    • widget_wsb_workshop_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=WorkshopButler
    • > Error in wp-includes/Requests/src/Exception/InvalidArgument.php+29
    Uncaught WpOrg\Requests\Exception\InvalidArgument: WpOrg\Requests\Cookie::__construct(): Argument #1 ($name) must be of type string, integer given in wp-includes/Requests/src/Exception/InvalidArgument.php:29
    Stack trace:
    #0 wp-includes/Requests/src/Cookie.php(84): WpOrg\Requests\Exception\InvalidArgument::create()
    #1 wp-includes/class-wp-http.php(472): WpOrg\Requests\Cookie->__construct()
    #2 wp-includes/class-wp-http.php(352): WP_Http::normalize_cookies()
    #3 wp-includes/http.php(150): WP_Http->request()
    #4 wp-content/plugins/workshop-butler/lib/ReduxFramework/ReduxCore/inc/class.p.php(229): wp_remote_request()
    #5 wp-includes/class-wp-hook.php(310): WorkshopButler\Redux_P->proxy()
    #6 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #7 wp-includes/plugin.php(517): WP_Hook->do_action()
    #8 wp-admin/admin-ajax.php(1

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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/workshop-butler/templates/calendar/tiles/trainers.php
  • 271× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\TokenParser\\AbstractTokenParser' not found in wp-content/plugins/workshop-butler/vendor/twig/twig/src/TokenParser/WithTokenParser.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WorkshopButler\\plugin_dir_path() in wp-content/plugins/workshop-butler/public/includes/models/class-paid-ticket-type.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\TestExpression' not found in wp-content/plugins/workshop-butler/vendor/twig/twig/src/Node/Expression/Test/DefinedTest.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\AbstractExpression' not found in wp-content/plugins/workshop-butler/vendor/twig/twig/src/Node/Expression/TempNameExpression.php:16
    • > PHP Fatal error
      require_once(): Failed opening required 'WSB_ABSPATH/includes/wsb-core-functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/workshop-butler/public/includes/hooks/class-trainer-list-hooks.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/workshop-butler/vendor/twig/twig/src/Node/Expression/Binary/SubBinary.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Error\\Error' not found in wp-content/plugins/workshop-butler/vendor/twig/twig/src/Error/LoaderError.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Test' not found in wp-content/plugins/workshop-butler/vendor/twig/twig/lib/Twig/Test/Method.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\TokenParser\\AbstractTokenParser' not found in wp-content/plugins/workshop-butler/vendor/twig/twig/src/TokenParser/ForTokenParser.php:35
    • > PHP Warning
      require_once(WSB_ABSPATH/includes/wsb-core-functions.php): failed to open stream: No such file or directory in wp-content/plugins/workshop-butler/public/includes/hooks/class-registration-form-hooks.php on line 11

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=WorkshopButler
    • > Deprecation (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1 Listener added for a synchronous 'DOMSubtreeModified' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.
    • > GET request to /wp-admin/options-general.php?page=WorkshopButler
    • > Network (severe)
    wp-admin/admin-ajax.php?action=redux_p&nonce=80da503d72&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3D80da503d72%26url%3D - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/options-general.php?page=WorkshopButler
    • > Security (severe) in unknown
    /wp-admin/options-general.php?page=WorkshopButler - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=80da503d72&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3D80da503d72%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (General), #2 (Events), #3 (Trainers), #4 (Pages), #5 (Custom CSS)
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === workshop-butler === )
The official readme.txt might help

workshop-butler/workshop-butler.php 92% from 13 tests

The main file in "Workshop Butler" v. 3.2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin70,021 lines of code in 1,009 files:
LanguageFilesBlank linesComment linesLines of code
PHP6368,63117,13834,641
JavaScript912,7662,02112,875
PO File83,44907,046
Sass531,105546,972
SVG50123,775
reStructuredText942,3382,1562,882
Twig6066758
CSS502644376
JSON400264
YAML3420171
make1245124
LESS10053
Bourne Shell16143
Python17316533
Markdown1408

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
The following items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 113)
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity9.85
▷ Minimum class complexity1.00
▷ Maximum class complexity881.00
Average method complexity3.65
▷ Minimum method complexity1.00
▷ Maximum method complexity113.00
Code structure
Namespaces29
Interfaces26
Traits0
Classes548
▷ Abstract classes183.28%
▷ Concrete classes53096.72%
▷ Final classes50.94%
Methods2,004
▷ Static methods28514.22%
▷ Public methods1,57078.34%
▷ Protected methods29414.67%
▷ Private methods1406.99%
Functions134
▷ Named functions10074.63%
▷ Anonymous functions3425.37%
Constants170
▷ Global constants84.71%
▷ Class constants16295.29%
▷ Public constants162100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
35 PNG files occupy 1.03MB with 0.59MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/ReduxFramework/ReduxCore/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
screenshot-5.png199.48KB45.95KB▼ 76.97%
lib/ReduxFramework/ReduxCore/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_inset-soft_95_fef1ec_1x100.png0.12KB0.16KB0.00%
lib/ReduxFramework/ReduxCore/assets/img/2-col-portfolio.png1.02KB0.15KB▼ 85.07%
screenshot-2.png247.64KB66.14KB▼ 73.29%