90% wc-checkout-terms-popup

Code Review | WooCommerce Checkout Terms Popup

WordPress plugin WooCommerce Checkout Terms Popup scored90%from 54 tests.

About plugin

  • Plugin page: wc-checkout-terms...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1
  • WordPress version: 6.3.1
  • First release: Nov 30, 2016
  • Latest release: Apr 2, 2019
  • Number of updates: 6
  • Update frequency: every 142.3 days
  • Top authors: shivapoudel (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /3,339 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.02MB] [CPU: ▼5.01ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Checkout Terms Popup
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.30 ▼1.46
Dashboard /wp-admin3.32 ▲0.0246.26 ▼2.94
Posts /wp-admin/edit.php3.38 ▲0.0246.45 ▼2.54
Add New Post /wp-admin/post-new.php5.91 ▲0.0293.47 ▼13.08
Media Library /wp-admin/upload.php3.25 ▲0.0235.36 ▲1.77

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Checkout Terms Popup
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲8014.74 ▲0.061.86 ▲0.1344.57 ▼3.10
Dashboard /wp-admin2,224 ▲395.91 ▲0.1096.06 ▼2.1844.10 ▲2.15
Posts /wp-admin/edit.php2,106 ▲172.03 ▲0.0242.22 ▼5.1038.98 ▲3.40
Add New Post /wp-admin/post-new.php1,543 ▲1023.09 ▼0.24652.46 ▲54.8650.07 ▼5.06
Media Library /wp-admin/upload.php1,406 ▲154.18 ▼0.0297.25 ▼0.1043.82 ▼1.51

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • 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 everything seems fine, this is not 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: popup, modal, terms conditions, conditions, woocommerce...

wc-checkout-terms-popup/wc-checkout-terms-popup.php Passed 13 tests

"WooCommerce Checkout Terms Popup" version 1.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
101 characters long description:
WooCommerce extension to allow your Terms page to open in a popup window during the checkout process.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin306 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP446131168
Sass114071
JavaScript410766
CSS1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity7.67
▷ Minimum class complexity5.00
▷ Maximum class complexity10.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods14
▷ Static methods857.14%
▷ Public methods1285.71%
▷ Protected methods00.00%
▷ Private methods214.29%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin