83% ad5-loyalty

Code Review | WP LOYALTY by AD5

WordPress plugin WP LOYALTY by AD5 scored83%from 54 tests.

About plugin

  • Plugin page: ad5-loyalty
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.2
  • WordPress version: 6.3.1
  • First release: Jan 12, 2018
  • Latest release: Jan 14, 2018
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: ad5admin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /746 total downloads


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.12MB] [CPU: ▼2.61ms] Passed 4 tests

Analyzing server-side resources used by WP LOYALTY by AD5
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1343.91 ▲2.98
Dashboard /wp-admin3.41 ▲0.1153.03 ▲4.54
Posts /wp-admin/edit.php3.52 ▲0.1754.40 ▲9.13
Add New Post /wp-admin/post-new.php6.03 ▲0.1488.53 ▼17.18
Media Library /wp-admin/upload.php3.33 ▲0.1037.09 ▼0.78

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 18 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for WP LOYALTY by AD5
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,960 ▲19914.35 ▲0.072.53 ▲0.7644.30 ▲0.97
Dashboard /wp-admin2,218 ▲385.54 ▼0.0799.69 ▲13.0040.95 ▼1.42
Posts /wp-admin/edit.php2,120 ▲231.98 ▼0.0236.10 ▼0.7634.94 ▼7.52
Add New Post /wp-admin/post-new.php1,693 ▲15821.33 ▲3.24682.41 ▲41.6263.12 ▼14.98
Media Library /wp-admin/upload.php1,426 ▲234.18 ▼0.06104.65 ▲1.6145.93 ▲0.28

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The plugin did not uninstall successfully, leaving 18 files (1.11MB) in the plugin directory
    • (new file) includes/class-ad5-colors.php
    • (new file) ad5-loyalty.php
    • (new file) languages/ad5-loyalty-ja.po
    • (new file) includes/class-ad5-loyalty-front.php
    • (new file) includes/class-ad5-auth.php
    • (new file) includes/class-ad5-form.php
    • (new file) includes/class-ad5-user-manager.php
    • (new file) includes/class-ad5-loyalty-admin.php
    • (new file) languages/ad5-loyalty-ja.mo
    • (new file) readme.txt
    • ...

Smoke tests 75% from 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 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
  • 4× 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/ad5-loyalty/ad5-loyalty.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'AD5_Loyalty_Admin' not found in wp-content/plugins/ad5-loyalty/template/admin-option.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/ad5-loyalty/template/modal.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'AD5_Loyalty_Admin' not found in wp-content/plugins/ad5-loyalty/template/admin-docs.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Donate link: Invalid url: ""
The official readme.txt is a good inspiration

ad5-loyalty/ad5-loyalty.php 92% from 13 tests

The entry point to "WP LOYALTY by AD5" version 1.0.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 184 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected1,500 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PO File1540104

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity26.33
▷ Minimum class complexity5.00
▷ Maximum class complexity58.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
▷ Static methods55.43%
▷ Public methods8592.39%
▷ Protected methods00.00%
▷ Private methods77.61%
▷ Named functions133.33%
▷ Anonymous functions266.67%
▷ Global constants00.00%
▷ Class constants25100.00%
▷ Public constants25100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 1.02MB with 0.71MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png275.54KB85.52KB▼ 68.96%
screenshot-1.png144.55KB43.96KB▼ 69.59%
screenshot-2.png346.70KB103.57KB▼ 70.13%
screenshot-4.png277.90KB86.28KB▼ 68.95%