84% adr-promotion-recommendations

Code Review | ADR Promotion Recommendations

WordPress plugin ADR Promotion Recommendations scored84%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: 6.3.1
  • 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 /914 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▲305.74ms] 75% from 4 tests

A check of server-side resources used by ADR Promotion Recommendations
It is recommended to improve the following
  • Extra CPU: Try to keep extra CPU usage under 200.00ms (currently 305.74ms on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.122,923.37 ▲2,882.63
Dashboard /wp-admin3.33 ▼0.0251.07 ▼14.38
Posts /wp-admin/edit.php3.38 ▲0.0250.29 ▼2.45
Add New Post /wp-admin/post-new.php5.93 ▲0.041,344.52 ▲1,236.54
Media Library /wp-admin/upload.php3.25 ▲0.0240.26 ▲3.23

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
adrcdp_publisher
adrcdp_publisher_auth
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_adrcdp_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by ADR Promotion Recommendations
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,779 ▲1814.37 ▼0.021.71 ▲0.0436.96 ▼4.22
Dashboard /wp-admin2,189 ▲155.53 ▼0.1384.89 ▼7.2036.75 ▼7.02
Posts /wp-admin/edit.php2,100 ▲31.96 ▼0.1439.20 ▲3.6835.03 ▼1.95
Add New Post /wp-admin/post-new.php1,526 ▼023.07 ▼0.16650.16 ▲4.5554.12 ▼0.31
Media Library /wp-admin/upload.php1,397 ▼04.26 ▲0.0897.52 ▼6.3642.86 ▼1.53

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_adrcdp_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/adr-promotion-recommendations/adr-promotion-recommendations.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: keywords, promotion, ad tags, meta, description...

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

The entry point to "ADR Promotion Recommendations" version 1.0.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 166 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress 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

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin