94% coupon-store

Code Review | Coupon Store

WordPress plugin Coupon Store scored 94% from 54 tests.

About plugin

  • Plugin page: coupon-store
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-3.3.2
  • WordPress version: 5.8.1
  • First release: May 30, 2012
  • Latest release: May 30, 2012
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: nickpowers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 5,750 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼141.93ms] Passed 4 tests

Server-side resources used by Coupon Store
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1339.42 ▲11.82
Dashboard /wp-admin3.07 ▲0.0254.38 ▲0.17
Posts /wp-admin/edit.php3.12 ▲0.0246.91 ▼2.80
Add New Post /wp-admin/post-new.php5.43 ▼0.0097.02 ▼564.00
Media Library /wp-admin/upload.php3.01 ▲0.0134.84 ▼1.08

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Coupon Store: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲13115.88 ▲0.319.36 ▼1.5950.46 ▼0.61
Dashboard /wp-admin2,964 ▲335.96 ▼0.18164.68 ▲16.35115.25 ▼2.21
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0181.25 ▲5.0496.15 ▼1.12
Add New Post /wp-admin/post-new.php1,594 ▼2118.83 ▼2.61421.76 ▲128.11126.33 ▲17.62
Media Library /wp-admin/upload.php1,807 ▼05.05 ▲0.03162.46 ▲2.76125.46 ▲11.07

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/coupon-store/include/Main_Class.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (Coupon Network shortcode in action!), #2 (Redplum shortcode in action!), #3 (SmartSource Network shortcode in action!)
You can look at the official readme.txt

coupon-store/couponstore.php 92% from 13 tests

The entry point to "Coupon Store" version 1.0 is a PHP file that has certain tags in its header comment area
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-store.php" instead of "couponstore.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected64 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2221164

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.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

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.31MB with 0.19MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png135.18KB43.61KB▼ 67.74%
screenshot-1.png123.60KB40.49KB▼ 67.24%
screenshot-2.png54.21KB28.15KB▼ 48.08%