89% woo-recent-purchases

Code Review | Woocommerce - Recent Purchases

WordPress plugin Woocommerce - Recent Purchases scored89%from 54 tests.

About plugin

  • Plugin page: woo-recent-purchases
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.3
  • WordPress version: 6.3.1
  • First release: Oct 9, 2017
  • Latest release: Aug 7, 2023
  • Number of updates: 18
  • Update frequency: every 118.3 days
  • Top authors: lobov (61.11%)Wpcalc (44.44%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,997 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.12MB] [CPU: ▼6.27ms] Passed 4 tests

An overview of server-side resources used by Woocommerce - Recent Purchases
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1238.06 ▼1.57
Dashboard /wp-admin3.42 ▲0.1246.26 ▼1.46
Posts /wp-admin/edit.php3.53 ▲0.1845.69 ▼6.11
Add New Post /wp-admin/post-new.php6.02 ▲0.1382.09 ▼15.92
Media Library /wp-admin/upload.php3.34 ▲0.1134.36 ▼0.59
Get More /wp-admin/admin.php?page=wow-company3.39474.55
Woo Recent Purchases /wp-admin/admin.php?page=woo-recent-purchases3.3738.61

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 79 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_wow_woo_recent_purchases
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Woocommerce - Recent Purchases: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲12613.38 ▼1.211.74 ▼0.0439.72 ▼4.64
Dashboard /wp-admin2,276 ▲885.91 ▼0.0296.64 ▼25.2639.95 ▼5.72
Posts /wp-admin/edit.php2,159 ▲672.07 ▲0.0638.77 ▲0.7534.45 ▼0.69
Add New Post /wp-admin/post-new.php1,540 ▲2623.05 ▲5.40677.57 ▼3.9967.34 ▲13.10
Media Library /wp-admin/upload.php1,458 ▲734.27 ▲0.0898.44 ▲2.9643.95 ▼3.32
Get More /wp-admin/admin.php?page=wow-company1,6342.1332.7269.23
Woo Recent Purchases /wp-admin/admin.php?page=woo-recent-purchases1,7786.87139.0362.37

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
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_wow_woo_recent_purchases
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (List of Downloads with image), #2 (List of Downloads with avatar), #3 (Admin), #4 (Admin)
The official readme.txt might help

woo-recent-purchases/woo-recent-purchases.php 92% from 13 tests

The main file in "Woocommerce - Recent Purchases" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin10,530 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
CSS59373,325
SVG1002,671
Sass1434341,768
LESS1434441,758
PHP18122198998
JavaScript10010

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity10.83
▷ Minimum class complexity3.00
▷ Maximum class complexity23.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes233.33%
Methods28
▷ Static methods27.14%
▷ Public methods2796.43%
▷ Protected methods00.00%
▷ Private methods13.57%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
There are no PNG files in this plugin