83% promo-referral-urls-generator-coupons-auto-apply-for-woo-free-by-wp-masters

Code Review | Promo & Referral URLs Generator, Coupons Auto Apply for Woo - Free by WP Masters

WordPress plugin Promo & Referral URLs Generator, Coupons Auto Apply for Woo - Free by WP Masters scored83%from 54 tests.

About plugin

  • Plugin page: promo-referral-ur...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Jul 19, 2022
  • Latest release: Jul 20, 2022
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: wpmasterscom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /484 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼6.62ms] Passed 4 tests

Server-side resources used by Promo & Referral URLs Generator, Coupons Auto Apply for Woo - Free by WP Masters
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.32 ▼2.22
Dashboard /wp-admin3.35 ▲0.0445.38 ▼3.28
Posts /wp-admin/edit.php3.40 ▲0.0446.22 ▼4.32
Add New Post /wp-admin/post-new.php5.95 ▲0.0686.28 ▼16.67
Media Library /wp-admin/upload.php3.27 ▲0.0437.15 ▼1.20

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Promo & Referral URLs Generator, Coupons Auto Apply for Woo - Free by WP Masters
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,979 ▲24416.84 ▲2.0612.51 ▲10.6846.44 ▼2.20
Dashboard /wp-admin2,244 ▲567.31 ▲2.45124.17 ▲18.3141.01 ▼2.34
Posts /wp-admin/edit.php2,124 ▲324.00 ▲1.9948.49 ▲5.8836.97 ▼1.39
Add New Post /wp-admin/post-new.php6,374 ▲4,84126.10 ▲2.92951.31 ▲300.4237.93 ▼23.57
Media Library /wp-admin/upload.php1,426 ▲386.65 ▲2.41112.09 ▼0.6545.08 ▼3.80

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

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

SRP 50% from 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
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/promo-referral-urls-generator-coupons-auto-apply-for-woo-free-by-wp-masters/wpm-cookie-promocodes-coupons.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/promo-referral-urls-generator-coupons-auto-apply-for-woo-free-by-wp-masters/templates/admin/settings.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: promocodes, invite, auto apply, referrals, coupons

promo-referral-urls-generator-coupons-auto-apply-for-woo-free-by-wp-masters/wpm-cookie-promocodes-coupons.php 77% from 13 tests

"Promo & Referral URLs Generator, Coupons Auto Apply for Woo - Free by WP Masters" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Plugin Name: It is recommended to keep the plugin name shorter than 70 characters (currently 80 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("promo-referral-urls-generator-coupons-auto-apply-for-woo-free-by-wp-masters.php" instead of "wpm-cookie-promocodes-coupons.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin11,078 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
SVG3009,552
CSS31435883
PHP23162360
JavaScript4115283

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
templates/assets/img/logo.png11.32KB4.55KB▼ 59.79%