10% wp-e-commerce-featured-products

Code Review | Name: WP e-Commerce Featured Products

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

About plugin

  • Plugin page: wp-e-commerce-fea...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.2
  • WordPress version: 6.3.1
  • First release: May 12, 2013
  • Latest release: Jul 4, 2013
  • Number of updates: 5
  • Update frequency: every 10.6 days
  • Top authors: MyWebsiteAdvisor (60%)ChrisHurst (60%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /4,614 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
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/wp-e-commerce-featured-products/wp-e-commerce-featured-products.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_Widget_Featured_Products has a deprecated constructor

Server metrics [RAM: ▼1.87MB] [CPU: ▼57.80ms] Passed 4 tests

Server-side resources used by Name: WP e-Commerce Featured Products
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.13 ▼1.335.23 ▼35.38
Dashboard /wp-admin2.15 ▼1.206.13 ▼55.48
Posts /wp-admin/edit.php2.15 ▼1.217.12 ▼40.19
Add New Post /wp-admin/post-new.php2.15 ▼3.745.71 ▼100.13
Media Library /wp-admin/upload.php2.15 ▼1.084.97 ▼28.20

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_wpsc_featured_products
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Name: WP e-Commerce Featured Products
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.151.98 ▲0.0243.24 ▼0.42
Dashboard /wp-admin2,206 ▲275.78 ▼0.1096.04 ▼9.0239.76 ▼3.33
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0440.35 ▲1.8434.35 ▼2.08
Add New Post /wp-admin/post-new.php1,514 ▼2817.57 ▼0.79654.69 ▲0.7951.69 ▼2.17
Media Library /wp-admin/upload.php1,385 ▼34.18 ▼0.2498.06 ▼8.4641.51 ▼4.70

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/wp-e-commerce-featured-products/wp-e-commerce-featured-products.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_Widget_Featured_Products has a deprecated constructor
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_wpsc_featured_products
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • 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
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 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-featured-products/wp-e-commerce-featured-products.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === Name: WP e-Commerce Featured Products=== )
  • Tags: There are too many tags (11 tag instead of maximum 10)
  • Screenshots: Please add images for these screenshots: #1 (Example Widget and Shortcode Display), #2 (Featured Products Widget Setup Screen), #3 (Featured Products Shortcode Example)
The official readme.txt might help

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

The main file in "Name: WP e-Commerce Featured Products" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
56 characters long description:
Featured Products Widget and Shortcode for WP e-Commerce

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
Good job! No executable or dangerous file extensions detected228 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP111353228

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity4.50
▷ Minimum class complexity3.00
▷ Maximum class complexity6.00
Average method complexity1.78
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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 are no PNG files in this plugin