83% product-sold-count

Code Review | Product Sold Count

WordPress plugin Product Sold Count scored83%from 54 tests.

About plugin

  • Plugin page: product-sold-count
  • Plugin version: 3.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.7
  • WordPress version: 6.3.1
  • First release: Sep 7, 2015
  • Latest release: Dec 30, 2016
  • Number of updates: 6
  • Update frequency: every 80.0 days
  • Top authors: hemant29 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,104 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
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Product Sold Count
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.98 ▼5.33
Dashboard /wp-admin3.31 ▲0.0153.63 ▼3.21
Posts /wp-admin/edit.php3.37 ▲0.0156.07 ▲5.14
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.25 ▼35.49
Media Library /wp-admin/upload.php3.24 ▲0.0138.91 ▼17.95

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Product Sold Count
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.26 ▲0.031.95 ▼0.2040.59 ▼3.68
Dashboard /wp-admin2,192 ▲155.51 ▼0.0889.13 ▼5.9739.40 ▼1.76
Posts /wp-admin/edit.php2,103 ▲32.03 ▲0.0640.32 ▲4.3535.53 ▲0.68
Add New Post /wp-admin/post-new.php1,531 ▲522.70 ▼0.81596.62 ▼128.9768.63 ▲3.48
Media Library /wp-admin/upload.php1,397 ▼04.10 ▲0.00135.38 ▲27.8969.21 ▲20.33

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/product-sold-count/woo-soldcount.php:10

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)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === product-sold-count === )
  • Donate link: Invalid url: ""
The official readme.txt might help

product-sold-count/woo-soldcount.php 92% from 13 tests

The principal PHP file in "Product Sold Count" v. 3.0.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("product-sold-count.php" instead of "woo-soldcount.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin44 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP271044

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected