89% recently-purchased-products-for-woo

Code Review | Recently Purchased Products For Woo

WordPress plugin Recently Purchased Products For Woo scored89%from 54 tests.

About plugin

  • Plugin page: recently-purchase...
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4
  • WordPress version: 6.3.1
  • First release: Jun 2, 2021
  • Latest release: Nov 21, 2023
  • Number of updates: 18
  • Update frequency: every 50.1 days
  • Top authors: worldweb (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /1,000 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

An overview of server-side resources used by Recently Purchased Products For Woo
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.84 ▼3.91
Dashboard /wp-admin3.33 ▲0.0244.08 ▼7.46
Posts /wp-admin/edit.php3.38 ▲0.0145.77 ▼2.80
Add New Post /wp-admin/post-new.php5.91 ▲0.0182.94 ▼14.47
Media Library /wp-admin/upload.php3.25 ▲0.0137.38 ▲4.94

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

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

Browser metrics Passed 4 tests

Recently Purchased Products For Woo: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3414.21 ▼0.141.62 ▼0.1337.73 ▼6.70
Dashboard /wp-admin2,201 ▲245.61 ▲0.0697.30 ▲2.6643.52 ▼4.51
Posts /wp-admin/edit.php2,106 ▲62.00 ▼0.0239.04 ▼0.7539.28 ▲2.29
Add New Post /wp-admin/post-new.php1,532 ▲323.12 ▼0.08613.72 ▲1.9357.37 ▲9.15
Media Library /wp-admin/upload.php1,397 ▼04.16 ▼0.04102.87 ▲3.5241.45 ▼0.08

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: recent orders, purchases, woocommerce, recent purchases, last purchases

recently-purchased-products-for-woo/recently-purchased-products-for-woo.php 85% from 13 tests

The principal PHP file in "Recently Purchased Products For Woo" v. 1.0.6 is loaded by WordPress automatically on each request
The following require your attention:
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages")
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages")

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
No dangerous file extensions were detected1,767 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
CSS36967909
PHP7273283813
JavaScript3145432
SVG11013

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity49.25
▷ Minimum class complexity1.00
▷ Maximum class complexity138.00
Average method complexity13.87
▷ Minimum method complexity1.00
▷ Maximum method complexity68.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 compressed PNG file occupies 0.05MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/assets/image/no-image.png47.02KB49.79KB0.00%