89% couponpanel

Code Review | CouponPanel

WordPress plugin CouponPanel scored89%from 54 tests.

About plugin

  • Plugin page: couponpanel
  • Plugin version: 1.7.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.8.3
  • WordPress version: 6.3.1
  • First release: Aug 8, 2019
  • Latest release: Jan 21, 2022
  • Number of updates: 82
  • Update frequency: every 11.0 days
  • Top authors: feeds4 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,088 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.22MB] [CPU: ▼4.96ms] Passed 4 tests

This is a short check of server-side resources used by CouponPanel
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.99 ▲0.2644.36 ▼2.80
Dashboard /wp-admin3.84 ▲0.2850.17 ▼6.32
Posts /wp-admin/edit.php3.89 ▲0.2155.53 ▼0.31
Add New Post /wp-admin/post-new.php6.36 ▲0.2191.89 ▼10.39
Media Library /wp-admin/upload.php3.70 ▲0.2144.62 ▲5.27

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

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

Browser metrics Passed 4 tests

CouponPanel: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲15513.60 ▼0.7811.88 ▲10.1543.50 ▼0.16
Dashboard /wp-admin2,207 ▲305.58 ▼0.0385.78 ▼14.5837.52 ▼3.84
Posts /wp-admin/edit.php2,109 ▲92.02 ▼0.1140.79 ▲0.2436.82 ▲0.66
Add New Post /wp-admin/post-new.php1,559 ▲2823.23 ▲0.02679.48 ▲17.1556.80 ▼4.00
Media Library /wp-admin/upload.php1,412 ▲154.20 ▼0.0297.32 ▼6.3950.21 ▲1.32

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

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 no errors were found, this is by no means 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
No output text or server-side errors detected on direct access of PHP files

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

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (14 tag instead of maximum 10)
Please take inspiration from this readme.txt

couponpanel/couponpanel.php 92% from 13 tests

"CouponPanel" version 1.7.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 178 characters long)

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
There were no executable files found in this plugin448 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS38212341
JavaScript41616104
PHP2093

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity10.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%
Functions31
▷ Named functions3096.77%
▷ Anonymous functions13.23%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/layout_l1.png8.75KB6.36KB▼ 27.41%
img/layout_l2.png7.94KB5.83KB▼ 26.51%
img/checkmark.png6.37KB2.87KB▼ 54.94%
img/layout_l3.png7.11KB5.28KB▼ 25.73%