84% woo-purchased-products

Code Review | Woo Purchased Products

WordPress plugin Woo Purchased Products scored84%from 54 tests.

About plugin

  • Plugin page: woo-purchased-pro...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.3
  • WordPress version: 6.3.1
  • First release: Apr 6, 2017
  • Latest release: Apr 7, 2017
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: mithublue (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /645 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by Woo Purchased Products
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0127.80 ▼12.37
Dashboard /wp-admin3.38 ▲0.0756.53 ▲3.94
Posts /wp-admin/edit.php3.47 ▲0.1255.70 ▲7.22
Add New Post /wp-admin/post-new.php5.96 ▲0.07104.68 ▲1.17
Media Library /wp-admin/upload.php3.30 ▲0.0746.26 ▲11.33

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Woo Purchased Products
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,480 ▼28114.46 ▲0.250.65 ▼1.1618.59 ▼29.92
Dashboard /wp-admin2,224 ▲245.85 ▲0.97120.02 ▲8.0444.77 ▲6.77
Posts /wp-admin/edit.php2,100 ▼32.03 ▼0.1039.65 ▲0.7336.55 ▼2.61
Add New Post /wp-admin/post-new.php1,526 ▼717.87 ▼5.37717.70 ▲58.0384.32 ▼10.13
Media Library /wp-admin/upload.php1,397 ▼04.31 ▲0.08101.65 ▼13.7442.72 ▼0.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
The following issues need your attention
  • 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/woo-purchased-products/vote.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes: The official readme.txt might help

woo-purchased-products/woo-purchased-products.php 92% from 13 tests

"Woo Purchased Products" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, 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 programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin7,370 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS2187,184
PHP24233168
JavaScript10018

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity11.00
▷ Minimum class complexity8.00
▷ Maximum class complexity14.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods642.86%
▷ Public methods1392.86%
▷ Protected methods17.14%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected