10% shopp-custom-categories-widget

Code Review | Shopp Custom Categories Widget

WordPress plugin Shopp Custom Categories Widget scored10%from 54 tests.

About plugin

  • Plugin page: shopp-custom-cate...
  • Plugin version: 0.5.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.0-3.2.2
  • WordPress version: 6.3.1
  • First release: Jun 1, 2012
  • Latest release: Oct 30, 2012
  • Number of updates: 17
  • Update frequency: every 8.9 days
  • Top authors: WebsiteBakery (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,495 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/shopp-custom-categories-widget/scc-widget.php+402
    Declaration of SCC_Widget::widget(array $args, array $options) should be compatible with WP_Widget::widget($args, $instance)

Server metrics [RAM: ▼1.89MB] [CPU: ▼55.04ms] Passed 4 tests

This is a short check of server-side resources used by Shopp Custom Categories Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.364.64 ▼35.64
Dashboard /wp-admin2.12 ▼1.226.42 ▼59.33
Posts /wp-admin/edit.php2.12 ▼1.235.59 ▼40.35
Add New Post /wp-admin/post-new.php2.12 ▼3.765.64 ▼84.85
Media Library /wp-admin/upload.php2.12 ▼1.106.13 ▼27.90

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Shopp Custom Categories Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.74 ▲0.371.78 ▲0.0544.80 ▲1.45
Dashboard /wp-admin2,209 ▲215.86 ▲1.0099.48 ▼16.9640.86 ▼4.10
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0335.49 ▼1.1132.09 ▼2.74
Add New Post /wp-admin/post-new.php1,514 ▼517.82 ▼5.28672.57 ▼38.3754.33 ▼2.53
Media Library /wp-admin/upload.php1,388 ▲34.20 ▼0.0195.89 ▼2.3940.28 ▼5.83

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/shopp-custom-categories-widget/scc-widget.php+402
    Declaration of SCC_Widget::widget(array $args, array $options) should be compatible with WP_Widget::widget($args, $instance)
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/shopp-custom-categories-widget/scc-widget.php:36

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 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === shopp-custom-categories-widget === )
  • Screenshots: Screenshot #1 (It's ridiculously easy to use. No need to build a list of category IDs or anything else - just select the categories you wish to include, choose the appropriate formatting style and you're done.) image required
The official readme.txt might help

shopp-custom-categories-widget/scc-widget.php 85% from 13 tests

The main file in "Shopp Custom Categories Widget" v. 0.5.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("shopp-custom-categories-widget.php" instead of "scc-widget.php")
  • Description: The description should be shorter than 140 characters (currently 141 characters long)

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 plugin473 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3150331401
CSS111151
JavaScript151021

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.36
Average class complexity22.67
▷ Minimum class complexity18.00
▷ Maximum class complexity29.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods27
▷ Static methods13.70%
▷ Public methods1451.85%
▷ Protected methods1348.15%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png16.68KB8.08KB▼ 51.55%