83% wp-widget-master

Code Review | Widget Master

WordPress plugin Widget Master scored83%from 54 tests.

About plugin

  • Plugin page: wp-widget-master
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.3
  • WordPress version: 6.3.1
  • First release: Jul 9, 2015
  • Latest release: Sep 14, 2015
  • Number of updates: 44
  • Update frequency: every 1.5 days
  • Top authors: x4293924w (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

20+ active /1,462 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼0.22ms] Passed 4 tests

A check of server-side resources used by Widget Master
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0838.47 ▼2.59
Dashboard /wp-admin3.42 ▲0.1275.41 ▲26.53
Posts /wp-admin/edit.php3.46 ▲0.1051.00 ▲2.28
Add New Post /wp-admin/post-new.php5.93 ▲0.0491.57 ▼2.13
Media Library /wp-admin/upload.php3.27 ▲0.0436.11 ▲1.57
Widget Master /wp-admin/options-general.php?page=wp-widget-master/widget-master.php3.3432.49

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 43 new files
Database: no new tables, 24 new options
New WordPress options
WidgetMaster_Open_Close_Main_Feature
WidgetMaster_On_Homepage
WidgetMaster_On_Pages
WidgetMaster_On_Search
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
WidgetMaster_Icon_color
WidgetMaster_Border_Radius
WidgetMaster_Turn_On_Off_Features
...

Browser metrics Passed 4 tests

Widget Master: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲14513.70 ▼1.126.07 ▲4.0839.17 ▼12.91
Dashboard /wp-admin2,210 ▲314.82 ▼0.11108.19 ▼11.4043.35 ▼4.20
Posts /wp-admin/edit.php2,093 ▲42.17 ▲0.1741.00 ▲3.7336.85 ▲1.59
Add New Post /wp-admin/post-new.php1,549 ▲718.39 ▲0.01620.83 ▼27.0258.31 ▲0.83
Media Library /wp-admin/upload.php1,389 ▼24.22 ▲0.0397.52 ▼3.1143.40 ▼0.42
Widget Master /wp-admin/options-general.php?page=wp-widget-master/widget-master.php1,2712.0832.1543.39

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
These items require your attention
  • This plugin does not fully uninstall, leaving 24 options in the database
    • widget_theysaidso_widget
    • WidgetMaster_On_Pages
    • can_compress_scripts
    • WidgetMaster_Icon_padding
    • WidgetMaster_Icon_size
    • WidgetMaster_On_Search
    • WidgetMaster_Icon_Close
    • WidgetMaster_On_Archives
    • WidgetMaster_Open_Close_Main_Feature
    • WidgetMaster_fromemail
    • ...

Smoke tests 75% 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 50% 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
Please fix the following
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/wp-widget-master/content-setting.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/wp-widget-master/widgets_pack.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/wp-widget-master/report.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-widget-master/includes/includes/wp-session.php:82
    • > PHP Fatal error
      Uncaught Error: Class 'Recursive_ArrayAccess' not found in wp-content/plugins/wp-widget-master/includes/includes/class-wp-session.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/wp-widget-master/turn_on_off_features.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-widget-master/includes/includes/wp-session.php:82
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/wp-widget-master/includes/includes/wp-cli.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/wp-widget-master/features/hide-display-widgets.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-widget-master/includes/includes/wp-session.php:82

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 20 tag instead of maximum 10
You can look at the official readme.txt

wp-widget-master/widget-master.php 85% from 13 tests

The main PHP script in "Widget Master" version 1.2 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 266 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-widget-master.php" instead of "widget-master.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected3,215 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP123985081,405
SVG201932
JavaScript229478
CSS2270303
PO File1394096
HTML1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity36.60
▷ Minimum class complexity7.00
▷ Maximum class complexity149.00
Average method complexity4.49
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods51
▷ Static methods611.76%
▷ Public methods4588.24%
▷ Protected methods59.80%
▷ Private methods11.96%
Functions22
▷ Named functions2195.45%
▷ Anonymous functions14.55%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
12 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/colorpicker_submit.png0.96KB1.04KB0.00%
images/colorpicker_hsb_s.png1.14KB0.80KB▼ 29.97%
images/colorpicker_overlay.png10.11KB8.24KB▼ 18.50%
images/jetpack-logo.png1.03KB0.72KB▼ 30.15%
images/colorpicker_rgb_r.png1.04KB0.77KB▼ 26.17%