84% easy-banner

Code Review | Easy Banner

WordPress plugin Easy Banner scored84%from 54 tests.

About plugin

  • Plugin page: easy-banner
  • Plugin version: 1.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.5
  • WordPress version: 6.3.1
  • First release: Aug 14, 2020
  • Latest release: Aug 14, 2020
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: paulschreiber (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /445 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼0.67ms] Passed 4 tests

Server-side resources used by Easy Banner
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0536.61 ▼1.56
Dashboard /wp-admin3.38 ▲0.0744.21 ▼2.23
Posts /wp-admin/edit.php3.43 ▲0.0746.80 ▲0.41
Add New Post /wp-admin/post-new.php5.96 ▲0.0793.46 ▲0.72
Media Library /wp-admin/upload.php3.30 ▲0.0735.66 ▲2.50
Easy Banner /wp-admin/options-general.php?page=easy-banner3.2734.19

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Easy Banner: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.15 ▼1.231.64 ▲0.0941.83 ▲0.27
Dashboard /wp-admin2,210 ▲224.86 ▼0.02106.77 ▼3.4040.94 ▲1.44
Posts /wp-admin/edit.php2,090 ▲11.99 ▼0.0139.56 ▲0.3934.54 ▲2.05
Add New Post /wp-admin/post-new.php1,545 ▲1318.82 ▼4.46601.88 ▼62.9750.21 ▼8.52
Media Library /wp-admin/upload.php1,386 ▼24.24 ▼0.0194.90 ▼19.4441.15 ▼6.97
Easy Banner /wp-admin/options-general.php?page=easy-banner8082.0423.1824.95

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • 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
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 take a closer look at the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'EasyBanner\\Banner' not found in wp-content/plugins/easy-banner/template-banner.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function EasyBanner\\add_action() in wp-content/plugins/easy-banner/includes/class-banner.php:82
    • > PHP Fatal error
      Uncaught Error: Call to undefined function EasyBanner\\add_action() in wp-content/plugins/easy-banner/includes/class-banner.php:82
    • > PHP Fatal error
      Uncaught Error: Class 'EasyBanner\\Settings' not found in wp-content/plugins/easy-banner/includes/class-banner-settings.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
1 plugin tags: banner

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

The main PHP file in "Easy Banner" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
21 characters long description:
Simple banner plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected231 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP537109231

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity10.33
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity3.15
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods13
▷ Static methods13100.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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
PNG images were not found in this plugin