10% wp-e-commerce-popular-products

Code Review | Name: WP e-Commerce Popular Products

WordPress plugin Name: WP e-Commerce Popular Productsscored10%from 54 tests.

About plugin

  • Plugin page: wp-e-commerce-pop...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 6.3.1
  • First release: May 11, 2013
  • Latest release: May 11, 2013
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: ChrisHurst (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,945 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
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/wp-e-commerce-popular-products/wp-e-commerce-popular-products.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_Widget_Popular_Products has a deprecated constructor

Server metrics [RAM: ▼1.86MB] [CPU: ▼57.63ms] Passed 4 tests

Server-side resources used by Name: WP e-Commerce Popular Products
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.324.74 ▼35.83
Dashboard /wp-admin2.16 ▼1.185.72 ▼53.15
Posts /wp-admin/edit.php2.16 ▼1.205.39 ▼42.53
Add New Post /wp-admin/post-new.php2.16 ▼3.735.69 ▼98.99
Media Library /wp-admin/upload.php2.16 ▼1.074.86 ▼27.98

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_wpsc_popular_products
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Name: WP e-Commerce Popular Products
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲2814.23 ▼0.121.76 ▼0.0537.45 ▼2.03
Dashboard /wp-admin2,189 ▲115.56 ▼0.1582.97 ▼30.7238.29 ▼2.73
Posts /wp-admin/edit.php2,097 ▼01.99 ▲0.0237.06 ▲1.2832.29 ▲0.68
Add New Post /wp-admin/post-new.php1,526 ▼523.03 ▲0.06614.74 ▲36.8486.87 ▲24.54
Media Library /wp-admin/upload.php1,397 ▼34.09 ▼0.11103.55 ▼2.7544.83 ▲1.36

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/wp-e-commerce-popular-products/wp-e-commerce-popular-products.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_Widget_Popular_Products has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_wpsc_popular_products
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-e-commerce-popular-products/wp-e-commerce-popular-products.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === Name: WP e-Commerce Popular Products=== )
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Example Widget and Shortcode Display), #2 (Example Widget Setup Screen), #3 (Example Shortcode Use)
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

wp-e-commerce-popular-products/wp-e-commerce-popular-products.php Passed 13 tests

"Name: WP e-Commerce Popular Products" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
55 characters long description:
Popular Products Widget and Shortcode for WP e-Commerce

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected312 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP113659312

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity7.50
▷ Minimum class complexity3.00
▷ Maximum class complexity12.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
There were not PNG files found in your plugin