84% adr-promotion-recommendations

Code Review | ADR Promotion Recommendations

WordPress plugin ADR Promotion Recommendations scored 84% from 54 tests.

About plugin

  • Plugin page: adr-promotion-rec...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 5.9.2
  • First release: Nov 23, 2018
  • Latest release: Dec 4, 2018
  • Number of updates: 13
  • Update frequency: every 0.9 days
  • Top authors: gguo01 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 644 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▲149.38ms] Passed 4 tests

This is a short check of server-side resources used by ADR Promotion Recommendations
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.101,263.81 ▲1,212.57
Dashboard /wp-admin3.43 ▲0.0233.30 ▲0.05
Posts /wp-admin/edit.php3.67 ▲0.0236.02 ▼1.40
Add New Post /wp-admin/post-new.php6.98 ▲0.011,881.32 ▲601.25
Media Library /wp-admin/upload.php3.32 ▲0.0223.34 ▼2.39

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 3 new options
New WordPress options
adrcdp_publisher_auth
adrcdp_publisher
widget_adrcdp_widget

Browser metrics Passed 4 tests

A check of browser resources used by ADR Promotion Recommendations
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲5316.22 ▲0.536.83 ▲0.152.66 ▲0.15
Dashboard /wp-admin2,892 ▲316.12 ▼0.06117.88 ▼16.56152.40 ▼4.36
Posts /wp-admin/edit.php2,691 ▼33.23 ▼0.0162.74 ▼1.62138.04 ▼6.12
Add New Post /wp-admin/post-new.php1,661 ▼5016.05 ▼5.22427.49 ▼21.81151.68 ▲2.43
Media Library /wp-admin/upload.php1,695 ▼35.51 ▼0.01134.78 ▼11.04188.13 ▲2.43

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 1 option
    • widget_adrcdp_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/adr-promotion-recommendations/adr-promotion-recommendations.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: ad tags, keywords, promotion, description, meta...

adr-promotion-recommendations/adr-promotion-recommendations.php 92% from 13 tests

The main PHP script in "ADR Promotion Recommendations" version 1.0.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 166 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected75 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2162275

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods4
▷ Static methods250.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected