90% common-coupon-label-for-woocommerce

Code Review | WM Common Coupon Label for WooCommerce

WordPress plugin WM Common Coupon Label for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: common-coupon-lab...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4
  • WordPress version: 6.3.1
  • First release: Sep 28, 2015
  • Latest release: Jan 2, 2016
  • Number of updates: 5
  • Update frequency: every 20.8 days
  • Top authors: webmumbai (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /670 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.00MB] [CPU: ▼5.28ms] Passed 4 tests

An overview of server-side resources used by WM Common Coupon Label for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.08 ▼6.35
Dashboard /wp-admin3.31 ▼0.0347.92 ▼17.01
Posts /wp-admin/edit.php3.36 ▲0.0152.90 ▲4.66
Add New Post /wp-admin/post-new.php5.89 ▲0.01104.94 ▲0.04
Media Library /wp-admin/upload.php3.23 ▲0.0136.19 ▲2.21

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WM Common Coupon Label for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼0.961.69 ▼0.3745.61 ▼2.15
Dashboard /wp-admin2,209 ▲244.82 ▼0.28109.37 ▼5.9741.53 ▼1.50
Posts /wp-admin/edit.php2,089 ▼32.04 ▲0.0339.46 ▲2.2634.50 ▲0.43
Add New Post /wp-admin/post-new.php1,536 ▲1723.36 ▲0.13587.42 ▼88.6955.54 ▲2.86
Media Library /wp-admin/upload.php1,388 ▲34.22 ▲0.03122.02 ▲19.6853.65 ▲6.33

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 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 Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

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
3 plugin tags: woocommerce common coupon label, wm plugin, common coupon label

common-coupon-label-for-woocommerce/wm-common-coupon-label-for-woocommerce-init.php 92% from 13 tests

The primary PHP file in "WM Common Coupon Label for WooCommerce" version 1.0.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("common-coupon-label-for-woocommerce.php" instead of "wm-common-coupon-label-for-woocommerce-init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected39 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2101239

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin