78% coupon-pop-for-wp

Code Review | Automatic Lead Generator for WooCommerce

WordPress plugin Automatic Lead Generator for WooCommerce scored 78% from 54 tests.

About plugin

  • Plugin page: coupon-pop-for-wp
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.7
  • WordPress version: 6.3.1
  • First release: Nov 18, 2013
  • Latest release: Mar 4, 2021
  • Number of updates: 954
  • Update frequency: every 2.8 days
  • Top authors: storeya (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

90+ active / 22,440 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: ▼5.53ms] Passed 4 tests

An overview of server-side resources used by Automatic Lead Generator for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.09 ▼1.21
Dashboard /wp-admin3.31 ▲0.0147.27 ▼3.99
Posts /wp-admin/edit.php3.37 ▲0.0143.74 ▼13.98
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.11 ▼2.95
Media Library /wp-admin/upload.php3.24 ▲0.0133.19 ▲0.23
StoreYa Coupon Pop /wp-admin/options-general.php?page=storeya-coupon-pop3.1827.57

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Automatic Lead Generator for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5513.27 ▼1.151.79 ▼0.6343.41 ▼2.46
Dashboard /wp-admin2,218 ▲305.84 ▼0.21101.13 ▼12.1241.30 ▼7.44
Posts /wp-admin/edit.php2,100 ▲112.12 ▲0.0833.92 ▼9.1834.50 ▼12.09
Add New Post /wp-admin/post-new.php1,546 ▲2523.14 ▲0.03656.33 ▼51.8660.38 ▲2.38
Media Library /wp-admin/upload.php1,403 ▲184.19 ▼0.0096.21 ▼4.8643.25 ▲2.55
StoreYa Coupon Pop /wp-admin/options-general.php?page=storeya-coupon-pop8412.1828.3434.94

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=storeya-coupon-pop
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=storeya-coupon-pop
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/coupon-pop-for-wp/storeya-coupon-pop.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/coupon-pop-for-wp/SyncManager.php:9

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 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: There are too many tags (58 tag instead of maximum 10)
You can take inspiration from this readme.txt

coupon-pop-for-wp/storeya-coupon-pop.php 92% from 13 tests

The main file in "Automatic Lead Generator for WooCommerce" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("coupon-pop-for-wp.php" instead of "storeya-coupon-pop.php")

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 detected373 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP311929373

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity21.50
▷ Minimum class complexity13.00
▷ Maximum class complexity30.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods317.65%
▷ Public methods1270.59%
▷ Protected methods423.53%
▷ Private methods15.88%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
2 PNG files occupy 0.06MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
storeya_coupon_pop.png56.10KB30.75KB▼ 45.19%
lock.png0.73KB0.91KB0.00%