78% turbo-widgets

Code Review | Turbo Widgets

WordPress plugin Turbo Widgets scored 78% from 54 tests.

About plugin

  • Plugin page: turbo-widgets
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.8.2
  • WordPress version: 5.9.2
  • First release: Apr 20, 2016
  • Latest release: Oct 5, 2017
  • Number of updates: 15
  • Update frequency: every 35.6 days
  • Top authors: toddhalfpenny (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

1,000+ active / 15,658 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
Install script ran successfully

Server metrics [RAM: ▲2.13MB] [CPU: ▼282.21ms] Passed 4 tests

Server-side resources used by Turbo Widgets
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.61 ▲2.1074.27 ▲17.66
Dashboard /wp-admin5.54 ▲2.1347.71 ▲10.13
Posts /wp-admin/edit.php5.83 ▲2.1953.48 ▲16.89
Add New Post /wp-admin/post-new.php9.07 ▲2.10112.75 ▼1,167.99
Media Library /wp-admin/upload.php5.49 ▲2.1939.23 ▲12.14
Turbo Sidebars /wp-admin/edit.php?post_type=turbo_sidebar_cpt5.5341.60
Freemius Debug [v.1.2.2.10] /wp-admin/admin.php?page=freemius5.5738.70
Turbo Widgets /wp-admin/admin.php?page=turbo-widgets5.5745.66

Server storage [IO: ▲1.71MB] [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: 183 new files
Database: no new tables, 4 new options
New WordPress options
fs_active_plugins
fs_api_cache
fs_debug_mode
fs_accounts

Browser metrics Passed 4 tests

Checking browser requirements for Turbo Widgets
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,941 ▲18216.34 ▲1.059.37 ▲2.072.79 ▲0.02
Dashboard /wp-admin2,935 ▲746.01 ▼0.18117.60 ▼25.27246.70 ▲84.73
Posts /wp-admin/edit.php2,737 ▲463.25 ▲0.0164.22 ▼24.52158.00 ▼7.49
Add New Post /wp-admin/post-new.php1,685 ▲2720.20 ▼0.30392.91 ▼54.42178.94 ▲19.43
Media Library /wp-admin/upload.php1,742 ▲445.55 ▲0.08152.69 ▲3.34210.47 ▲18.08
Turbo Sidebars /wp-admin/edit.php?post_type=turbo_sidebar_cpt1,4133.1664.60133.02
Freemius Debug [v.1.2.2.10] /wp-admin/admin.php?page=freemius1,4192.4955.05132.61
Turbo Widgets /wp-admin/admin.php?page=turbo-widgets1,2612.6158.61175.98

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 4 options
    • fs_accounts
    • fs_api_cache
    • fs_active_plugins
    • fs_debug_mode

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/turbo-widgets/freemius/templates/ajax-loader.php
    • > /wp-content/plugins/turbo-widgets/public/partials/turbo-widgets-public-display.php
    • > /wp-content/plugins/turbo-widgets/admin/partials/turbo-widgets-admin-display.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/turbo-widgets/admin/turbo-editor-dialog.php on line 37
    • > PHP Notice
      Undefined variable: tw_attrs in wp-content/plugins/turbo-widgets/admin/turbo-editor-dialog.php on line 202
    • > PHP Notice
      Undefined variable: tw_attrs in wp-content/plugins/turbo-widgets/admin/turbo-editor-dialog.php on line 217
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/turbo-widgets/admin/turbo-editor-dialog.php:46

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can take inspiration from this readme.txt

turbo-widgets/turbo-widgets.php 92% from 13 tests

The main file in "Turbo Widgets" v. 2.0.0 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:
  • Description: Please don't use more than 140 characters for the plugin description (currently 146 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected26,425 lines of code in 147 files:
LanguageFilesBlank linesComment linesLines of code
PHP1004,31610,81018,233
PO File52,1402,1634,830
Sass20329762,091
JavaScript769155578
SVG111442
Markdown1610192
JSON10040
CSS122819

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please tend to the following items
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 1,269)
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity44.49
▷ Minimum class complexity1.00
▷ Maximum class complexity1,269.00
Average method complexity3.58
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes45
▷ Abstract classes24.44%
▷ Concrete classes4395.56%
▷ Final classes00.00%
Methods789
▷ Static methods12916.35%
▷ Public methods59575.41%
▷ Protected methods141.77%
▷ Private methods18022.81%
Functions82
▷ Named functions82100.00%
▷ Anonymous functions00.00%
Constants104
▷ Global constants8581.73%
▷ Class constants1918.27%
▷ Public constants19100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
images/turbo_tiny_mce.png0.55KB0.49KB▼ 11.70%
freemius/assets/img/turbo-widgets.png9.16KB5.26KB▼ 42.58%
images/tw.png2.47KB1.48KB▼ 40.02%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%