84% wp-e-commerce-simple-product-options

Code Review | WP e-Commerce Simple Product Options

WordPress plugin WP e-Commerce Simple Product Options scored84%from 54 tests.

About plugin

  • Plugin page: wp-e-commerce-sim...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.3
  • WordPress version: 6.3.1
  • First release: Aug 20, 2011
  • Latest release: Aug 10, 2015
  • Number of updates: 53
  • Update frequency: every 27.4 days
  • Top authors: leewillis77 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /22,331 total downloads

Benchmarks

Plugin footprint 83% 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.02MB] [CPU: ▼6.72ms] Passed 4 tests

An overview of server-side resources used by WP e-Commerce Simple Product Options
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0541.56 ▲3.57
Dashboard /wp-admin3.34 ▼0.0145.25 ▼16.60
Posts /wp-admin/edit.php3.39 ▲0.0345.84 ▼2.54
Add New Post /wp-admin/post-new.php5.92 ▲0.0389.51 ▼9.19
Media Library /wp-admin/upload.php3.27 ▲0.0336.77 ▲1.44

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WP e-Commerce Simple Product Options
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.53 ▲0.181.64 ▼0.1037.46 ▼4.06
Dashboard /wp-admin2,198 ▲215.59 ▼0.0692.27 ▲3.9841.49 ▼1.67
Posts /wp-admin/edit.php2,103 ▲32.01 ▼0.0039.36 ▲2.8335.20 ▲1.91
Add New Post /wp-admin/post-new.php1,526 ▼023.24 ▼0.53624.80 ▲7.1453.60 ▲3.77
Media Library /wp-admin/upload.php1,400 ▲34.24 ▲0.04100.96 ▼11.0148.25 ▲1.02

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Walker' not found in wp-content/plugins/wp-e-commerce-simple-product-options/simple-product-options-admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-e-commerce-simple-product-options/simple-product-options-frontend.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-e-commerce-simple-product-options/simple-product-options-common.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-e-commerce-simple-product-options/simple-product-options.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === wp-e-commerce-simple-product-options === )
The official readme.txt is a good inspiration

wp-e-commerce-simple-product-options/simple-product-options.php 92% from 13 tests

Analyzing the main PHP file in "WP e-Commerce Simple Product Options" version 2.0
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-e-commerce-simple-product-options.php" instead of "simple-product-options.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin229 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP416641219
JavaScript10010

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity9.25
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity2.65
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin