79% magic-coupon-and-deal

Code Review | Magic Coupon And Deal

WordPress plugin Magic Coupon And Deal scored79%from 54 tests.

About plugin

  • Plugin page: magic-coupon-and-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8
  • WordPress version: 6.3.1
  • First release: Jul 6, 2017
  • Latest release: Jul 6, 2017
  • Number of updates: 5
  • Update frequency: every 2.0 days
  • Top authors: ifourkuldeep1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /706 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Magic Coupon And Deal
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0538.07 ▼6.33
Dashboard /wp-admin3.35 ▲0.0544.44 ▼5.78
Posts /wp-admin/edit.php3.40 ▲0.0549.44 ▲3.11
Add New Post /wp-admin/post-new.php6.02 ▲0.1385.46 ▼6.65
Media Library /wp-admin/upload.php3.28 ▲0.0532.16 ▼4.50
Coupons /wp-admin/edit.php?post_type=coupons3.3236.69
Magic Coupon And Deal /wp-admin/plugins.php?page=mcad3.2829.82
Add New /wp-admin/post-new.php?post_type=coupons6.0378.10

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Magic Coupon And Deal
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,946 ▲20013.56 ▼0.828.37 ▲6.5038.68 ▼3.68
Dashboard /wp-admin2,241 ▲535.83 ▼0.10104.96 ▲2.8739.16 ▼0.54
Posts /wp-admin/edit.php2,124 ▲352.02 ▲0.0140.23 ▲1.3236.29 ▼0.06
Add New Post /wp-admin/post-new.php1,544 ▲1123.59 ▲0.43669.17 ▼20.4657.51 ▲5.51
Media Library /wp-admin/upload.php1,423 ▲354.12 ▼0.07109.91 ▲2.7948.84 ▲2.61
Coupons /wp-admin/edit.php?post_type=coupons1,0971.9829.5126.07
Magic Coupon And Deal /wp-admin/plugins.php?page=mcad8812.0224.9229.88
Add New /wp-admin/post-new.php?post_type=coupons1,76918.54856.0570.70

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

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

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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/magic-coupon-and-deal/public/partials/magic-coupon-and-deal-public-display.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/magic-coupon-and-deal/public/partials/templates/single-coupon.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/magic-coupon-and-deal/admin/partials/magic-coupon-and-deal-admin-display.php:17

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: offers, coupon, deal, coupon plugin, coupon-website

magic-coupon-and-deal/magic-coupon-and-deal.php Passed 13 tests

The principal PHP file in "Magic Coupon And Deal" v. 1.0.0 is loaded by WordPress automatically on each request
63 characters long description:
A WP plugin that convert your wordpress blog to coupon website.

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
No dangerous file extensions were detected639 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP14185577625
CSS23178
JavaScript24546

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity5.12
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity1.70
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods47
▷ Static methods24.26%
▷ Public methods3982.98%
▷ Protected methods36.38%
▷ Private methods510.64%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.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
There are no PNG files in this plugin