10% rybons-coupon

Code Review | RybonsCoupon

WordPress plugin RybonsCoupon scored 10% from 54 tests.

About plugin

  • Plugin page: rybons-coupon
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5
  • WordPress version: 5.8.1
  • First release: Jun 11, 2015
  • Latest release: Jun 28, 2015
  • Number of updates: 4
  • Update frequency: every 4.3 days
  • Top authors: klipsedeville (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 440 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/rybons-coupon/RybonsCoupon_Plugin.php+29
    count(): Parameter must be an array or an object that implements Countable

Server metrics [RAM: ▲0.16MB] [CPU: ▼144.52ms] Passed 4 tests

An overview of server-side resources used by RybonsCoupon
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.98 ▲0.1440.04 ▲5.00
Dashboard /wp-admin3.27 ▲0.2148.56 ▼1.76
Posts /wp-admin/edit.php3.32 ▲0.2134.47 ▼14.42
Add New Post /wp-admin/post-new.php5.56 ▲0.1394.48 ▼564.10
Media Library /wp-admin/upload.php3.15 ▲0.1537.87 ▲2.22
RybonsCoupon /wp-admin/plugins.php?page=RybonsCoupon_PluginSettings3.2235.66

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 4 new options
New WordPress options
RybonsCoupon_Plugin_rybonsCouponMerchantKey
RybonsCoupon_Plugin__version
RybonsCoupon_Plugin_rybonsCouponConnectionMode
RybonsCoupon_Plugin__installed

Browser metrics Passed 4 tests

An overview of browser requirements for RybonsCoupon
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8816.26 ▲0.4410.44 ▲1.5850.92 ▼3.39
Dashboard /wp-admin2,972 ▲385.88 ▼0.06144.64 ▼6.12123.26 ▼4.58
Posts /wp-admin/edit.php2,741 ▲22.69 ▲0.0171.20 ▲4.00100.36 ▼1.76
Add New Post /wp-admin/post-new.php1,597 ▼718.78 ▼0.01380.08 ▼12.54117.49 ▲7.46
Media Library /wp-admin/upload.php1,812 ▲85.01 ▲0.03164.95 ▲11.95121.36 ▼10.62
RybonsCoupon /wp-admin/plugins.php?page=RybonsCoupon_PluginSettings1,1432.0863.8185.04

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 4 options
    • RybonsCoupon_Plugin__installed
    • RybonsCoupon_Plugin__version
    • RybonsCoupon_Plugin_rybonsCouponMerchantKey
    • RybonsCoupon_Plugin_rybonsCouponConnectionMode

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/rybons-coupon/rybonscoupon.php:67

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Donate link: Invalid URI found ("")
The official readme.txt is a good inspiration

rybons-coupon/rybonscoupon.php 85% from 13 tests

The main file in "RybonsCoupon" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("rybons-coupon.php" instead of "rybonscoupon.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin706 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP8191549706

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity14.17
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity1.98
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes233.33%
▷ Concrete classes466.67%
▷ Final classes00.00%
Methods83
▷ Static methods00.00%
▷ Public methods5060.24%
▷ Protected methods2833.73%
▷ Private methods56.02%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin