74% add-banner-af

Code Review | ADD BANNER AF

WordPress plugin ADD BANNER AF scored 74% from 54 tests.

About plugin

  • Plugin page: add-banner-af
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-2.9
  • WordPress version: 5.9.2
  • First release: Sep 10, 2013
  • Latest release: Sep 10, 2013
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: filomedio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 1,771 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼2.34MB] [CPU: ▼341.40ms] Passed 4 tests

An overview of server-side resources used by ADD BANNER AF
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.02 ▼1.496.47 ▼45.31
Dashboard /wp-admin2.04 ▼1.368.05 ▼24.96
Posts /wp-admin/edit.php2.05 ▼1.596.46 ▼30.75
Add New Post /wp-admin/post-new.php2.04 ▼4.936.61 ▼1,262.09
Media Library /wp-admin/upload.php2.05 ▼1.266.43 ▼27.45

Server storage [IO: ▲0.10MB] [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: 4 new files
Database: no new tables, 1 new option
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by ADD BANNER AF
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲916.20 ▲0.525.77 ▼0.012.34 ▼1.26
Dashboard /wp-admin2,895 ▲346.16 ▼0.02118.60 ▼15.29156.05 ▼0.39
Posts /wp-admin/edit.php2,688 ▲43.25 ▼0.0062.50 ▼1.99143.75 ▲2.02
Add New Post /wp-admin/post-new.php1,661 ▼5016.40 ▼4.28387.36 ▼93.24153.31 ▼45.75
Media Library /wp-admin/upload.php1,698 ▼35.49 ▲0.02138.22 ▼3.35187.56 ▼10.66

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5409
    The called constructor method for WP_Widget in Add_Image is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_add_image

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/add-banner-af/add_banner_AF.php:11

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


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (This is that you can see in your widget area after the activation of plugin.), #2 (This is the manage panel of widget.)
You can take inspiration from this readme.txt

add-banner-af/add_banner_AF.php 92% from 13 tests

Analyzing the main PHP file in "ADD BANNER AF" version 1.0
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("add-banner-af.php" instead of "add_banner_AF.php")

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 detected61 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ 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
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png24.62KB6.17KB▼ 74.93%