84% add-banner-extension

Code Review | Add Banner Extension

WordPress plugin Add Banner Extension scored84%from 54 tests.

About plugin

  • Plugin page: add-banner-extension
  • Plugin version: 2.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.2-5.2.1
  • WordPress version: 6.3.1
  • First release: Mar 14, 2017
  • Latest release: Jun 1, 2019
  • Number of updates: 31
  • Update frequency: every 26.0 days
  • Top authors: Sararilfy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,420 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.01ms] Passed 4 tests

Analyzing server-side resources used by Add Banner Extension
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0540.35 ▲0.63
Dashboard /wp-admin3.41 ▲0.0749.86 ▼3.88
Posts /wp-admin/edit.php3.53 ▲0.1349.30 ▼1.12
Add New Post /wp-admin/post-new.php5.99 ▲0.0786.98 ▼11.65
Media Library /wp-admin/upload.php3.34 ▲0.0741.38 ▲5.22
Add New /wp-admin/admin.php?page=add-banner-extension/includes/add-banner-admin-post.php3.4340.27
All Banner List /wp-admin/admin.php?page=add-banner-extension/add-banner-extension.php3.3531.97

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 16 new files
Database: 1 new table, 7 new options
New tables
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Add Banner Extension
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.26 ▼0.091.71 ▼0.0340.71 ▼1.35
Dashboard /wp-admin2,222 ▲455.66 ▼0.0087.07 ▼6.0939.24 ▼2.55
Posts /wp-admin/edit.php2,127 ▲271.96 ▲0.0134.60 ▼8.0934.11 ▼2.84
Add New Post /wp-admin/post-new.php1,548 ▲2023.22 ▲0.01668.27 ▲31.3949.09 ▲4.94
Media Library /wp-admin/upload.php1,430 ▲304.19 ▲0.00111.31 ▲3.8947.01 ▲2.11
Add New /wp-admin/admin.php?page=add-banner-extension/includes/add-banner-admin-post.php1,1313.4046.5162.86
All Banner List /wp-admin/admin.php?page=add-banner-extension/add-banner-extension.php8082.0123.1423.84

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/add-banner-extension/add-banner-extension.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/add-banner-extension/includes/add-banner-admin-404.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/add-banner-extension/includes/add-banner-admin-upload.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (The registered banner image list is displayed.), #2 (Banner image registration and edit screen. Items : Image URL (required), Image Alt Text (required), Link URL, Open New Tab, Class Name, Id Name, Display Category (required).)
The official readme.txt might help

add-banner-extension/add-banner-extension.php Passed 13 tests

The main PHP script in "Add Banner Extension" version 2.0.9 is automatically included on every request by WordPress
110 characters long description:
Register an image from the administration screen, and a different banner image is displayed for each category.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin840 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PO File14157101

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity12.83
▷ Minimum class complexity1.00
▷ Maximum class complexity21.00
Average method complexity3.09
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods2573.53%
▷ Protected methods00.00%
▷ Private methods926.47%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ 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
3 PNG files occupy 0.43MB with 0.21MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png136.86KB49.05KB▼ 64.16%
images/no-image.png4.90KB3.94KB▼ 19.57%
screenshot-2.png295.03KB114.29KB▼ 61.26%