84% image-banner-ads

Code Review | Image Banner Ads

WordPress plugin Image Banner Ads scored84%from 54 tests.

About plugin

  • Plugin page: image-banner-ads
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.7.5
  • WordPress version: 6.3.1
  • First release: Nov 25, 2015
  • Latest release: Aug 4, 2016
  • Number of updates: 9
  • Update frequency: every 62.4 days
  • Top authors: enqtran (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /7,171 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.75ms] Passed 4 tests

An overview of server-side resources used by Image Banner Ads
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.12 ▲1.56
Dashboard /wp-admin3.31 ▼0.0349.17 ▼10.52
Posts /wp-admin/edit.php3.37 ▲0.0145.96 ▲1.23
Add New Post /wp-admin/post-new.php5.91 ▲0.0380.50 ▼27.94
Media Library /wp-admin/upload.php3.24 ▲0.0134.17 ▼1.77

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_enqtran_images_banner_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Image Banner Ads
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5614.74 ▼0.021.79 ▼0.0444.31 ▲4.53
Dashboard /wp-admin2,211 ▲265.82 ▼0.07101.64 ▼2.0542.40 ▼3.27
Posts /wp-admin/edit.php2,108 ▲162.25 ▲0.2634.72 ▼7.3532.42 ▼6.08
Add New Post /wp-admin/post-new.php1,519 ▼923.33 ▲4.80691.36 ▲37.0964.28 ▲2.17
Media Library /wp-admin/upload.php1,400 ▲124.23 ▲0.0897.12 ▼21.4045.21 ▼2.38

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_enqtran_images_banner_widget
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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 fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/image-banner-ads/plugin_image_widget.php:19

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (screenshot-1.png), #2 (screenshot-2.png), #3 (screenshot-3.png), #4 (screenshot-4.png), #5 (screenshot-5.png)
You can look at the official readme.txt

image-banner-ads/plugin_image_widget.php 92% from 13 tests

The main PHP script in "Image Banner Ads" version 1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("image-banner-ads.php" instead of "plugin_image_widget.php")

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
Success! There were no dangerous files found in this plugin236 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11034236

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.34MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png295.76KB98.65KB▼ 66.64%
screenshot-1.png7.37KB4.78KB▼ 35.17%
screenshot-3.png27.00KB15.13KB▼ 43.95%
screenshot-2.png16.75KB9.95KB▼ 40.59%
screenshot-5.png5.63KB3.89KB▼ 30.88%