83% woocommerce-checkout-terms-conditions-popup

Code Review | WooCommerce Checkout Terms Conditions Popup

WordPress plugin WooCommerce Checkout Terms Conditions Popup scored83%from 54 tests.

About plugin

  • Plugin page: woocommerce-check...
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.0
  • WordPress version: 6.3.1
  • First release: May 29, 2015
  • Latest release: Jul 7, 2022
  • Number of updates: 32
  • Update frequency: every 81.2 days
  • Top authors: Dualcube (87.5%)wcmp (9.38%)purnendu (9.38%)

Code review

54 tests

User reviews

11 reviews

Install metrics

2,000+ active /48,728 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Server-side resources used by WooCommerce Checkout Terms Conditions Popup
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.24 ▼21.80
Dashboard /wp-admin3.32 ▼0.0244.68 ▼15.90
Posts /wp-admin/edit.php3.37 ▲0.0247.47 ▲4.67
Add New Post /wp-admin/post-new.php5.90 ▲0.02103.34 ▲9.28
Media Library /wp-admin/upload.php3.24 ▲0.0235.22 ▲4.11

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Checkout Terms Conditions Popup
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲6713.24 ▼1.131.63 ▼0.5241.55 ▼3.85
Dashboard /wp-admin2,219 ▲285.79 ▼0.09100.80 ▼2.7941.28 ▼0.68
Posts /wp-admin/edit.php2,102 ▲131.99 ▲0.0240.09 ▼2.3338.53 ▲0.47
Add New Post /wp-admin/post-new.php1,550 ▲2223.07 ▲4.84641.82 ▲35.7852.45 ▲0.33
Media Library /wp-admin/upload.php1,401 ▲104.23 ▼0.0993.55 ▼4.9042.18 ▼2.81

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/woocommerce-checkout-terms-conditions-popup/checkout_terms_conditions_popup.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: woocommerce terms, woocommerce, terms and conditions popup, woocommerce conditions, woocommerce checkout terms and conditions popup...

woocommerce-checkout-terms-conditions-popup/checkout_terms_conditions_popup.php 85% from 13 tests

The main PHP file in "WooCommerce Checkout Terms Conditions Popup" ver. 1.2.2 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woocommerce-checkout-terms-conditions-popup.php" instead of "checkout_terms_conditions_popup.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 283 characters long)

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
Good job! No executable or dangerous file extensions detected10,403 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript41,7971,7317,035
CSS33622152,187
PHP113001871,181

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity30.75
▷ Minimum class complexity2.00
▷ Maximum class complexity165.00
Average method complexity6.53
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods43
▷ Static methods49.30%
▷ Public methods43100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) assets/images/question_mark.png0.86KB0.00KB▼ 100.00%
assets/images/dualcube.png3.29KB0.65KB▼ 80.17%
assets/images/dclogo.png3.46KB0.84KB▼ 75.80%
assets/images/dclogo-2x.png4.35KB1.74KB▼ 60.10%
assets/images/placeholder.png2.75KB2.92KB0.00%