74% add-banner-af

Code Review | ADD BANNER AF

WordPress plugin ADD BANNER AF scored74%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: 6.3.1
  • 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

20+ active /1,949 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼1.71MB] [CPU: ▼49.73ms] Passed 4 tests

A check of server-side resources used by ADD BANNER AF
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.1812.85 ▼28.23
Dashboard /wp-admin2.29 ▼1.0113.02 ▼40.92
Posts /wp-admin/edit.php2.29 ▼1.0611.16 ▼41.14
Add New Post /wp-admin/post-new.php2.29 ▼3.5910.37 ▼88.62
Media Library /wp-admin/upload.php2.29 ▼0.949.25 ▼25.11

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_add_image

Browser metrics Passed 4 tests

An overview of browser requirements for ADD BANNER AF
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.37 ▼1.011.80 ▲0.0140.31 ▼6.00
Dashboard /wp-admin2,206 ▲185.91 ▲1.0598.84 ▼14.1040.79 ▼6.47
Posts /wp-admin/edit.php2,089 ▲182.01 ▼0.0137.27 ▲1.2038.05 ▼2.44
Add New Post /wp-admin/post-new.php1,533 ▲423.26 ▲0.20660.23 ▼26.9162.08 ▲11.12
Media Library /wp-admin/upload.php1,391 ▲34.17 ▼0.0897.00 ▼7.4845.66 ▼0.60

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Add_Image is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_add_image
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

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
Everything seems fine, however 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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > 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 a shallow check for browser errors
Everything seems fine on the user side

Optimizations

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: These screenshots have no corresponding images in /assets: #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

The main PHP script in "ADD BANNER AF" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to 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
Success! There were no dangerous files found in this plugin61 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP112861

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
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
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to 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%