90% edd-prevent-checkout

Code Review | EDD Prevent Checkout

WordPress plugin EDD Prevent Checkout scored 90% from 54 tests.

About plugin

  • Plugin page: edd-prevent-checkout
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.7.3
  • WordPress version: 6.3.1
  • First release: Oct 16, 2013
  • Latest release: Mar 27, 2017
  • Number of updates: 5
  • Update frequency: every 251.8 days
  • Top authors: sumobi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.11ms] Passed 4 tests

Server-side resources used by EDD Prevent Checkout
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.42 ▼4.52
Dashboard /wp-admin3.33 ▲0.0343.88 ▼4.92
Posts /wp-admin/edit.php3.38 ▲0.0248.77 ▼0.15
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.36 ▼11.37
Media Library /wp-admin/upload.php3.25 ▲0.0235.86 ▼3.61

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for EDD Prevent Checkout
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.20 ▼1.171.61 ▲0.0540.99 ▼3.65
Dashboard /wp-admin2,206 ▲184.85 ▼1.04111.22 ▲10.2439.08 ▼0.94
Posts /wp-admin/edit.php2,092 ▲62.05 ▲0.0539.32 ▲3.0635.07 ▲1.88
Add New Post /wp-admin/post-new.php1,544 ▲2418.21 ▼4.97639.19 ▼59.3449.78 ▼8.81
Media Library /wp-admin/upload.php1,385 ▼64.16 ▼0.0096.25 ▼7.7540.85 ▼5.57

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 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 no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
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
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed: The official readme.txt is a good inspiration

edd-prevent-checkout/edd-prevent-checkout.php Passed 13 tests

Analyzing the main PHP file in "EDD Prevent Checkout" version 1.0.1
84 characters long description:
Prevents customers from being able to checkout until a minimum cart total is reached

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin76 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1388076

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.56
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ Public methods888.89%
▷ Protected methods00.00%
▷ Private methods111.11%
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
PNG images were not found in this plugin