84% simple-banner

Code Review | Simple Banner - An easy to use Banner/Bar/Notification/Announcement for the top or bottom of your website

WordPress plugin Simple Banner - An easy to use Banner/Bar/Notification/Announcement for the top or bottom of your website scored84%from 54 tests.

About plugin

  • Plugin page: simple-banner
  • Plugin version: 2.16.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3.2
  • WordPress version: 6.3.1
  • First release: Jul 14, 2015
  • Latest release: Nov 2, 2023
  • Number of updates: 113
  • Update frequency: every 26.8 days
  • Top authors: rpetersen29 (100%)

Code review

54 tests

User reviews

41 reviews

Install metrics

50,000+ active /1,140,857 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.15MB] [CPU: ▼5.31ms] Passed 4 tests

Analyzing server-side resources used by Simple Banner - An easy to use Banner/Bar/Notification/Announcement for the top or bottom of your website
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1451.49 ▲8.83
Dashboard /wp-admin3.48 ▲0.1350.57 ▼16.36
Posts /wp-admin/edit.php3.59 ▲0.2348.39 ▼0.08
Add New Post /wp-admin/post-new.php6.06 ▲0.1793.16 ▼3.58
Media Library /wp-admin/upload.php3.40 ▲0.1734.11 ▼1.23

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Simple Banner - An easy to use Banner/Bar/Notification/Announcement for the top or bottom of your website: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲14113.49 ▼0.888.33 ▲6.6447.99 ▲5.06
Dashboard /wp-admin2,211 ▲375.51 ▼0.1488.12 ▼7.0638.27 ▼3.41
Posts /wp-admin/edit.php2,113 ▲131.98 ▼0.0235.63 ▼2.1736.57 ▲4.09
Add New Post /wp-admin/post-new.php1,547 ▲2118.30 ▼4.89628.41 ▼60.2970.67 ▲17.82
Media Library /wp-admin/upload.php1,416 ▲164.21 ▼0.04100.44 ▲0.4444.15 ▲0.72

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

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
Even though no errors were found, this is by no means 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
Please fix the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/simple-banner/free_features.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/simple-banner/pro_features.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/simple-banner/simple-banner.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: announcement, banner, free, simple, bulletin...

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

This is the main PHP file of "Simple Banner - An easy to use Banner/Bar/Notification/Announcement for the top or bottom of your website" version 2.16.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
61 characters long description:
Display a simple banner at the top or bottom of your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,381 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP399671,264
JavaScript19788
CSS12024
XML1005

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin