78% recent-purchased-items

Code Review | Woocommerce - Recent purchased items

WordPress plugin Woocommerce - Recent purchased items scored78%from 54 tests.

About plugin

  • Plugin page: recent-purchased-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1
  • WordPress version: 6.3.1
  • First release: Mar 8, 2023
  • Latest release: Mar 8, 2023
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: sangramsinh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /90 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
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Woocommerce - Recent purchased items
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0248.70 ▲6.94
Dashboard /wp-admin3.33 ▼0.0246.88 ▼18.49
Posts /wp-admin/edit.php3.38 ▲0.0252.09 ▼0.38
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.32 ▼12.86
Media Library /wp-admin/upload.php3.25 ▲0.0236.01 ▲4.90
Recent Purchased Items /wp-admin/admin.php?page=recentpurchaseditems3.2241.93

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Woocommerce - Recent purchased items
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.25 ▼0.291.88 ▲0.3144.20 ▲3.43
Dashboard /wp-admin2,198 ▲185.62 ▲0.0385.56 ▼5.8739.46 ▼4.21
Posts /wp-admin/edit.php2,100 ▲32.01 ▲0.0635.72 ▼1.4534.29 ▼2.91
Add New Post /wp-admin/post-new.php1,526 ▼023.06 ▼0.21723.82 ▲108.8066.49 ▲5.89
Media Library /wp-admin/upload.php1,397 ▼34.21 ▲0.0399.50 ▼9.3045.73 ▲0.45
Recent Purchased Items /wp-admin/admin.php?page=recentpurchaseditems8182.0323.3229.51

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/recent-purchased-items/includes/dashboard.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/recent-purchased-items/recent-purchased-items.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention: Please take inspiration from this readme.txt

recent-purchased-items/recent-purchased-items.php 85% from 13 tests

The principal PHP file in "Woocommerce - Recent purchased items" v. 1.0.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.3" instead of "5.2")
  • Requires PHP: The required version number must match the one declared in readme.txt ("5.3" instead of "7.2")

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 plugin128 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP25159128

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin