84% woocommerce-last-purchased

Code Review | WooCommerce Last Purchased

WordPress plugin WooCommerce Last Purchased scored 84% from 54 tests.

About plugin

  • Plugin page: woocommerce-last-...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4
  • WordPress version: 6.3.1
  • First release: Jul 28, 2015
  • Latest release: Nov 24, 2015
  • Number of updates: 12
  • Update frequency: every 15.5 days
  • Top authors: DawidUrbanski (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,380 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.69ms] Passed 4 tests

A check of server-side resources used by WooCommerce Last Purchased
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0538.22 ▼1.51
Dashboard /wp-admin3.34 ▲0.0345.10 ▼1.32
Posts /wp-admin/edit.php3.45 ▲0.0945.77 ▼1.87
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.08 ▼18.07
Media Library /wp-admin/upload.php3.26 ▲0.0334.01 ▲2.13

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 63 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

WooCommerce Last Purchased: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲15713.97 ▼0.436.12 ▲4.1142.74 ▼5.52
Dashboard /wp-admin2,203 ▲215.87 ▲0.00102.03 ▲1.2441.99 ▼4.67
Posts /wp-admin/edit.php2,089 ▼32.04 ▲0.0540.64 ▼2.3336.09 ▼0.71
Add New Post /wp-admin/post-new.php1,533 ▼923.39 ▲5.29621.92 ▲19.7553.68 ▲2.89
Media Library /wp-admin/upload.php1,382 ▼94.23 ▲0.0593.73 ▼5.8439.85 ▼1.48

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 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 50% from 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/woocommerce-last-purchased/templates/popup.php:1

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
1 plugin tags: woocommerce

woocommerce-last-purchased/woocommerce-last-purcahsed.php 85% from 13 tests

The entry point to "WooCommerce Last Purchased" version 1.0.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • 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
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woocommerce-last-purchased.php" instead of "woocommerce-last-purcahsed.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,881 lines of code in 60 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript5337941,291
Markdown31260394
PHP287113143
PO File12227
CSS111026

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity1.79
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods15.26%
▷ Public methods1368.42%
▷ Protected methods00.00%
▷ Private methods631.58%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin