84% wc-sold-unit-display

Code Review | Sold Unit Display for Woocommerce

WordPress plugin Sold Unit Display for Woocommerce scored84%from 54 tests.

About plugin

  • Plugin page: wc-sold-unit-display
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.8
  • WordPress version: 6.3.1
  • First release: Jul 23, 2021
  • Latest release: Jul 23, 2021
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: palagorn.p (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,130 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

This is a short check of server-side resources used by Sold Unit Display for Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.47 ▼1.74
Dashboard /wp-admin3.31 ▼0.0443.47 ▼18.09
Posts /wp-admin/edit.php3.36 ▲0.0047.79 ▲0.06
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.70 ▼10.96
Media Library /wp-admin/upload.php3.23 ▲0.0032.81 ▼2.54

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Sold Unit Display for Woocommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.31 ▼1.145.64 ▲3.9341.66 ▼5.13
Dashboard /wp-admin2,203 ▲175.77 ▲0.8399.97 ▼13.0540.01 ▲0.00
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0139.54 ▲1.3134.98 ▲0.85
Add New Post /wp-admin/post-new.php1,542 ▲918.32 ▼4.80630.47 ▼47.9858.18 ▲5.79
Media Library /wp-admin/upload.php1,388 ▲64.16 ▼0.0596.78 ▼2.2443.09 ▼4.14

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 were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wc-sold-unit-display/wc-sold-unit-display.php:14

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 97% 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 your attention: The official readme.txt might help

wc-sold-unit-display/wc-sold-unit-display.php Passed 13 tests

The principal PHP file in "Sold Unit Display for Woocommerce" v. 1.0.1 is loaded by WordPress automatically on each request
49 characters long description:
Show the number of product unit sold on frontend.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin469 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP46132348
PO File14247115
CSS1106

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods12100.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin