68% wide-banner

Code Review | Wide Banner

WordPress plugin Wide Banner scored68%from 54 tests.

About plugin

  • Plugin page: wide-banner
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4.0
  • WordPress version: 6.3.1
  • First release: May 5, 2020
  • Latest release: May 10, 2020
  • Number of updates: 19
  • Update frequency: every 0.3 days
  • Top authors: guihom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,544 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Wide Banner
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.45 ▼0.0133.34 ▼16.67
Dashboard /wp-admin3.38 ▲0.0850.58 ▼4.20
Posts /wp-admin/edit.php3.50 ▲0.1449.87 ▼4.14
Add New Post /wp-admin/post-new.php5.98 ▲0.1087.03 ▼5.32
Media Library /wp-admin/upload.php3.31 ▲0.0843.60 ▲6.32
New banner /wp-admin/admin.php?page=create_wb3.2834.67
List of banners /wp-admin/admin.php?page=list-of-banner3.2735.14

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 11 new files
Database: 1 new table, 6 new options
New tables
wp_wb_banner
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Wide Banner
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,904 ▲14313.48 ▼1.0711.08 ▲9.0738.35 ▼9.64
Dashboard /wp-admin2,222 ▲455.55 ▼0.1189.48 ▲4.8842.93 ▲2.37
Posts /wp-admin/edit.php2,127 ▲242.03 ▼0.0040.70 ▲4.7336.33 ▲1.11
Add New Post /wp-admin/post-new.php1,549 ▲2023.25 ▲0.20688.47 ▼12.1254.75 ▼4.53
Media Library /wp-admin/upload.php1,427 ▲304.14 ▼0.12106.39 ▼0.5650.13 ▲2.41
New banner /wp-admin/admin.php?page=create_wb9862.0325.4931.67
List of banners /wp-admin/admin.php?page=list-of-banner7882.0525.5125.36

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 cannot be uninstalled
    • > Notice in wp-content/plugins/wide-banner/database/database.php+34
    Undefined variable: db_table_name2
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% 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 everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wide-banner/wide-banner.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wide-banner/views/wide-banner-options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wide-banner/views/liste-wb.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wide-banner/include/functions.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid url: "paypal.me/pluginnplay"
You can take inspiration from this readme.txt

wide-banner/wide-banner.php Passed 13 tests

The principal PHP file in "Wide Banner" v. 1.0.4 is loaded by WordPress automatically on each request
84 characters long description:
Display a banner on your website. Easy, simple and free banner plugin for wordpress.

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
Good job! No executable or dangerous file extensions detected480 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP66751364
JavaScript2111094
CSS21022

PHP code Passed 2 tests

A short review 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.21
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity2.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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin