78% coupon-bulker

Code Review | Coupon Bulker

WordPress plugin Coupon Bulker scored78%from 54 tests.

About plugin

  • Plugin page: coupon-bulker
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 19, 2021
  • Latest release: Dec 27, 2022
  • Number of updates: 8
  • Update frequency: every 91.6 days
  • Top authors: looknear (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /1,736 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼3.96ms] Passed 4 tests

Analyzing server-side resources used by Coupon Bulker
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0943.80 ▲0.04
Dashboard /wp-admin3.39 ▲0.0850.38 ▼3.86
Posts /wp-admin/edit.php3.50 ▲0.1551.15 ▼2.29
Add New Post /wp-admin/post-new.php5.99 ▲0.1093.04 ▼7.37
Media Library /wp-admin/upload.php3.31 ▲0.0835.44 ▼2.32

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 71 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Coupon Bulker
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲11513.68 ▼1.058.47 ▲6.7243.16 ▼1.49
Dashboard /wp-admin2,199 ▲215.61 ▲0.0289.67 ▼11.0039.64 ▼6.15
Posts /wp-admin/edit.php2,107 ▲72.02 ▼0.0142.14 ▼0.8237.00 ▼3.00
Add New Post /wp-admin/post-new.php1,530 ▲222.98 ▲0.02628.54 ▼36.8546.31 ▼30.20
Media Library /wp-admin/upload.php1,404 ▲44.28 ▲0.0698.51 ▼11.3941.77 ▼4.39

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 take a closer look at the following
  • 27× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/coupon-bulker/admin/partials/_pgbackup/coupon-bulker-duplicate-modal_1611080432.php
    • > /wp-content/plugins/coupon-bulker/admin/partials/_pgbackup/coupon-bulker-duplicate-modal_1611080175.php
    • > /wp-content/plugins/coupon-bulker/admin/partials/_pgbackup/coupon-bulker-duplicate-modal_1611079844.php
    • > /wp-content/plugins/coupon-bulker/admin/partials/_pgbackup/coupon-bulker-duplicate-modal_1611079968.php
    • > /wp-content/plugins/coupon-bulker/admin/partials/_pgbackup/coupon-bulker-duplicate-modal_1611081796.php
    • > /wp-content/plugins/coupon-bulker/admin/partials/coupon-bulker-admin-display.php
    • > /wp-content/plugins/coupon-bulker/admin/partials/_pgbackup/coupon-bulker-duplicate-modal_1611081769.php
    • > /wp-content/plugins/coupon-bulker/admin/partials/coupon-bulker-delete-modal.php
    • > /wp-content/plugins/coupon-bulker/admin/partials/_pgbackup/coupon-bulker-duplicate-modal_1611080478.php
    • > /wp-content/plugins/coupon-bulker/admin/partials/_pgbackup/coupon-bulker-duplicate-modal_1611080081.php
  • 46× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: coupon_code in wp-content/plugins/coupon-bulker/admin/partials/_pgbackup/coupon-bulker-duplicate-modal_1611080320.php on line 3
    • > PHP Notice
      Undefined variable: coupon_id in wp-content/plugins/coupon-bulker/admin/partials/_pgbackup/coupon-bulker-duplicate-modal_1611080081.php on line 32
    • > PHP Notice
      Undefined variable: coupon_id in wp-content/plugins/coupon-bulker/admin/partials/_pgbackup/coupon-bulker-duplicate-modal_1611080216.php on line 29
    • > PHP Notice
      Undefined variable: coupon_id in wp-content/plugins/coupon-bulker/admin/partials/_pgbackup/coupon-bulker-duplicate-modal_1611080175.php on line 29
    • > PHP Notice
      Undefined variable: coupon_id in wp-content/plugins/coupon-bulker/admin/partials/_pgbackup/coupon-bulker-duplicate-modal_1611079978.php on line 32
    • > PHP Notice
      Undefined variable: coupon_code in wp-content/plugins/coupon-bulker/admin/partials/_pgbackup/coupon-bulker-duplicate-modal_1611081730.php on line 3
    • > PHP Notice
      Undefined variable: coupon_id in wp-content/plugins/coupon-bulker/admin/partials/_pgbackup/coupon-bulker-duplicate-modal_1611079844.php on line 32
    • > PHP Notice
      Undefined variable: coupon_id in wp-content/plugins/coupon-bulker/admin/partials/_pgbackup/coupon-bulker-duplicate-modal_1611081614.php on line 29
    • > PHP Notice
      Undefined variable: coupon_code in wp-content/plugins/coupon-bulker/admin/partials/_pgbackup/coupon-bulker-duplicate-modal_1611080432.php on line 3
    • > PHP Notice
      Undefined variable: coupon_id in wp-content/plugins/coupon-bulker/admin/partials/_pgbackup/coupon-bulker-duplicate-modal_1611081716.php on line 29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === coupon-bulker === )
Please take inspiration from this readme.txt

coupon-bulker/coupon-bulker.php 92% from 13 tests

The main PHP file in "Coupon Bulker" ver. 1.6 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 177 characters long)

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
Good job! No executable or dangerous file extensions detected925 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP28191593875
JavaScript2136247
JSON3003
CSS30110

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity3.71
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity1.58
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods33
▷ Static methods26.06%
▷ Public methods2472.73%
▷ Protected methods00.00%
▷ Private methods927.27%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.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
PNG images were not found in this plugin