84% shopp-variants-sku

Code Review | Shopp Variants SKU

WordPress plugin Shopp Variants SKU scored84%from 54 tests.

About plugin

  • Plugin page: shopp-variants-sku
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Apr 8, 2013
  • Latest release: Apr 24, 2013
  • Number of updates: 20
  • Update frequency: every 0.9 days
  • Top authors: viriava (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /864 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.22ms] Passed 4 tests

An overview of server-side resources used by Shopp Variants SKU
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0142.04 ▲0.46
Dashboard /wp-admin28.03 ▲0.014,998,774.39 ▲8,063.54
Posts /wp-admin/edit.php3.41 ▲0.0151.34 ▲2.77
Add New Post /wp-admin/post-new.php5.94 ▲0.0188.29 ▼12.18
Media Library /wp-admin/upload.php3.29 ▲0.0138.52 ▼3.92

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Shopp Variants SKU: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲12613.78 ▼0.578.73 ▲6.8942.65 ▲0.53
Dashboard /wp-admin2,195 ▲205.61 ▼0.0494.26 ▼21.8044.84 ▲1.07
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0635.82 ▼1.7333.99 ▲0.55
Add New Post /wp-admin/post-new.php1,541 ▲1523.05 ▲0.07676.18 ▼9.2560.69 ▲5.21
Media Library /wp-admin/upload.php1,400 ▼04.21 ▲0.1196.20 ▼17.4143.40 ▼3.99

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • 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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shopp-variants-sku/shopp-variants-sku.php:13

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 Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: shopp, variant, product, sku

shopp-variants-sku/shopp-variants-sku.php Passed 13 tests

The main file in "Shopp Variants SKU" v. 1.0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
58 characters long description:
This Shopp extension show correct sku for selected variant

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 plugin84 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP19868
JavaScript14016

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods250.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin