68% coupon-grab

Code Review | Coupon Grab by ClipNCrazy.com

WordPress plugin Coupon Grab by ClipNCrazy.com scored68%from 54 tests.

About plugin

  • Plugin page: coupon-grab
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-3.3.1
  • WordPress version: 6.3.1
  • First release: Dec 30, 2011
  • Latest release: Jan 18, 2012
  • Number of updates: 9
  • Update frequency: every 2.1 days
  • Top authors: nickpowers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,665 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.08MB] [CPU: ▼8.35ms] Passed 4 tests

This is a short check of server-side resources used by Coupon Grab by ClipNCrazy.com
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0942.48 ▲0.25
Dashboard /wp-admin3.40 ▲0.0550.82 ▼14.52
Posts /wp-admin/edit.php3.51 ▲0.1549.80 ▼3.44
Add New Post /wp-admin/post-new.php5.98 ▲0.0985.28 ▼15.69
Media Library /wp-admin/upload.php3.32 ▲0.0939.98 ▲2.69
General /wp-admin/admin.php?page=cfeed-general3.2631.85
HTML /wp-admin/admin.php?page=cfeed-html3.2634.19

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: 1 new table, 6 new options
New tables
wp_couponfeeder
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Coupon Grab by ClipNCrazy.com: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.72 ▲0.191.94 ▲0.3145.11 ▼0.54
Dashboard /wp-admin2,206 ▲295.52 ▼0.1497.65 ▼5.4080.58 ▲30.24
Posts /wp-admin/edit.php2,129 ▲291.97 ▼0.0636.11 ▲0.7330.43 ▼5.37
Add New Post /wp-admin/post-new.php1,564 ▲3823.14 ▼0.02714.01 ▲36.3351.33 ▼11.40
Media Library /wp-admin/upload.php1,414 ▲144.17 ▼0.04101.33 ▼14.9991.01 ▲39.38
General /wp-admin/admin.php?page=cfeed-general9592.0022.9328.45
HTML /wp-admin/admin.php?page=cfeed-html8552.0023.2827.67

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_couponfeeder
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cfeed-html
    • > Notice in wp-content/plugins/coupon-grab/coupongrab.php+476
    Undefined index: action
    • > GET request to /wp-admin/admin.php?page=cfeed-general
    • > Notice in wp-content/plugins/coupon-grab/coupongrab.php+338
    Undefined index: coupon_grab_now
    • > GET request to /wp-admin/admin.php?page=cfeed-general
    • > User deprecated in wp-includes/functions.php+5453
    Function get_all_category_ids is deprecated since version 4.0.0! Use get_terms() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cfeed-html
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/coupon-grab/coupongrab.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Coupon Grab in action!), #2 (General Options), #3 (Custom HTML Options)
Please take inspiration from this readme.txt

coupon-grab/coupongrab.php 92% from 13 tests

The primary PHP file in "Coupon Grab by ClipNCrazy.com" version 1.2 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("coupon-grab.php" instead of "coupongrab.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected414 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP214240414

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity11.25
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity3.16
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods19
▷ Static methods15.26%
▷ Public methods19100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.11MB with 0.04MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png41.51KB19.73KB▼ 52.46%
screenshot-3.png47.84KB21.78KB▼ 54.47%
screenshot-1.png23.82KB12.96KB▼ 45.60%
images/admin/red_feed.png0.89KB0.97KB0.00%