90% pw-woocommerce-copy-coupon

Code Review | PW WooCommerce Copy Coupon

WordPress plugin PW WooCommerce Copy Coupon scored90%from 54 tests.

About plugin

  • Plugin page: pw-woocommerce-co...
  • Plugin version: 1.30
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Feb 28, 2017
  • Latest release: Oct 25, 2023
  • Number of updates: 40
  • Update frequency: every 60.7 days
  • Top authors: pimwick (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active /33,487 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.37ms] Passed 4 tests

Server-side resources used by PW WooCommerce Copy Coupon
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.71 ▲0.39
Dashboard /wp-admin3.34 ▲0.0348.25 ▼1.15
Posts /wp-admin/edit.php3.39 ▲0.0355.02 ▲11.00
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.44 ▼3.37
Media Library /wp-admin/upload.php3.26 ▲0.0333.50 ▼1.34

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by PW WooCommerce Copy Coupon
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.07 ▼0.151.75 ▲0.1337.99 ▼6.94
Dashboard /wp-admin2,195 ▲155.60 ▼0.0483.49 ▼6.1035.40 ▼7.04
Posts /wp-admin/edit.php2,103 ▲211.94 ▼0.0943.39 ▲8.5442.73 ▲7.01
Add New Post /wp-admin/post-new.php1,535 ▲918.31 ▼4.69621.40 ▼88.6283.36 ▲29.77
Media Library /wp-admin/upload.php1,400 ▲64.20 ▼0.0096.29 ▼2.1242.84 ▼2.63

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

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
8 plugin tags: duplicate, woocommerce, utilities, copy coupons, tools...

pw-woocommerce-copy-coupon/pw-woocommerce-copy-coupon.php 92% from 13 tests

The main file in "PW WooCommerce Copy Coupon" v. 1.30 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.5" instead of "4.0")

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
No dangerous file extensions were detected140 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15136140

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods8
▷ Static methods00.00%
▷ Public methods675.00%
▷ Protected methods00.00%
▷ Private methods225.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin