84% shopp-category-shipping-filters

Code Review | Shopp Category Shipping Filters

WordPress plugin Shopp Category Shipping Filters scored84%from 54 tests.

About plugin

  • Plugin page: shopp-category-sh...
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.8.0
  • WordPress version: 6.3.1
  • First release: Feb 22, 2013
  • Latest release: Sep 11, 2017
  • Number of updates: 9
  • Update frequency: every 185.2 days
  • Top authors: clifgriffin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,297 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 gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼0.90ms] Passed 4 tests

A check of server-side resources used by Shopp Category Shipping Filters
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0941.77 ▲2.32
Dashboard /wp-admin3.39 ▲0.0955.82 ▲4.21
Posts /wp-admin/edit.php3.50 ▲0.1550.75 ▼2.44
Add New Post /wp-admin/post-new.php5.97 ▲0.0886.16 ▼5.75
Media Library /wp-admin/upload.php3.31 ▲0.0839.46 ▲2.27

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 494 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Shopp Category Shipping Filters
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.71 ▼0.571.97 ▼0.2944.79 ▲4.88
Dashboard /wp-admin2,206 ▲185.90 ▲0.0599.30 ▼18.4244.08 ▼5.00
Posts /wp-admin/edit.php2,086 ▼62.05 ▼0.0136.18 ▼0.9335.93 ▲2.43
Add New Post /wp-admin/post-new.php1,536 ▼1023.28 ▲4.93717.30 ▲78.0858.04 ▲6.14
Media Library /wp-admin/upload.php1,379 ▼94.26 ▲0.0899.21 ▼3.2145.14 ▲2.08

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
The following issues need your attention
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/shopp-category-shipping-filters/vendor/objectivco/wordpress-simple-settings/examples/awesome-plugin/inc/wordpress-simple-settings.php:176
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ShoppCategoryShippingFilters\\plugins_url() in wp-content/plugins/shopp-category-shipping-filters/shopp-category-shipping-filters.php:14
    • > PHP Fatal error
      Uncaught Error: Call to a member function the_nonce() on null in wp-content/plugins/shopp-category-shipping-filters/vendor/objectivco/wordpress-simple-settings/examples/awesome-plugin/awesome-plugin-admin.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WordPress_SimpleSettings' not found in wp-content/plugins/shopp-category-shipping-filters/app/class-main.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === shopp-category-shipping-filters === )
The official readme.txt is a good inspiration

shopp-category-shipping-filters/shopp-category-shipping-filters.php Passed 13 tests

"Shopp Category Shipping Filters" version 2.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
82 characters long description:
Allows filtering of shipping options based on the categories cart items belong to.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin50,856 lines of code in 414 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1928,9504,26434,824
Sass1161,5401,6488,438
HTML6988304,971
SVG200672
CSS312520645
PHP14162323630
Markdown71400406
JSON900242
YAML15017
XML10011

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.42
Average class complexity14.12
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity2.84
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes8
▷ Abstract classes225.00%
▷ Concrete classes675.00%
▷ Final classes00.00%
Methods58
▷ Static methods35.17%
▷ Public methods5798.28%
▷ Protected methods00.00%
▷ Private methods11.72%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
64 PNG files occupy 0.44MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/js/select2/docs/vendor/images/flags/id.png7.15KB3.27KB▼ 54.24%
assets/js/select2/docs/vendor/images/flags/de.png7.72KB3.41KB▼ 55.81%
assets/js/select2/docs/vendor/images/flags/ct.png8.99KB3.88KB▼ 56.90%
assets/js/select2/docs/images/apple-touch-icon-60x60.png1.91KB1.80KB▼ 5.48%
assets/js/select2/docs/vendor/images/flags/ca.png6.99KB3.36KB▼ 51.92%