84% woo-customers-by-product-purchase

Code Review | Customers by Product Purchase

WordPress plugin Customers by Product Purchase scored84%from 54 tests.

About plugin

  • Plugin page: woo-customers-by-...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.4
  • WordPress version: 6.3.1
  • First release: Jun 29, 2014
  • Latest release: Mar 14, 2020
  • Number of updates: 4
  • Update frequency: every 521.3 days
  • Top authors: tareq1988 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,235 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
Installer ran successfully

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

An overview of server-side resources used by Customers by Product Purchase
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0146.26 ▼2.17
Dashboard /wp-admin3.32 ▲0.0248.58 ▼8.48
Posts /wp-admin/edit.php3.38 ▲0.0151.80 ▼2.73
Add New Post /wp-admin/post-new.php5.91 ▲0.0199.69 ▼16.29
Media Library /wp-admin/upload.php3.25 ▲0.0141.99 ▲2.24

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Customers by Product Purchase
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.35 ▲0.112.19 ▲0.0346.75 ▲3.62
Dashboard /wp-admin2,195 ▲155.61 ▼0.0785.71 ▼3.8740.10 ▼3.70
Posts /wp-admin/edit.php2,103 ▼01.98 ▲0.0042.47 ▲5.2635.75 ▲0.63
Add New Post /wp-admin/post-new.php1,526 ▼023.11 ▲0.06678.02 ▲17.8254.98 ▲3.30
Media Library /wp-admin/upload.php1,403 ▲34.17 ▼0.03100.95 ▼10.7245.79 ▼2.37

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/woo-customers-by-product-purchase/view.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: reject, ie, modernizer, browsers, browser...

woo-customers-by-product-purchase/customers.php 92% from 13 tests

The entry point to "Customers by Product Purchase" version 0.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-customers-by-product-purchase.php" instead of "customers.php")

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
There were no executable files found in this plugin123 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24385123

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.29
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
No PNG files were detected