90% easy-banners-widget

Code Review | Easy Banners Widget

WordPress plugin Easy Banners Widget scored90%from 54 tests.

About plugin

  • Plugin page: easy-banners-widget
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.5.2
  • WordPress version: 6.3.1
  • First release: May 14, 2016
  • Latest release: May 14, 2016
  • Number of updates: 3
  • Update frequency: every 5.3 days
  • Top authors: dbmartin (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,514 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.76ms] Passed 4 tests

Analyzing server-side resources used by Easy Banners Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0334.33 ▼2.40
Dashboard /wp-admin3.33 ▲0.0243.17 ▼7.79
Posts /wp-admin/edit.php3.44 ▲0.0844.63 ▼0.99
Add New Post /wp-admin/post-new.php5.91 ▲0.0281.54 ▼15.84
Media Library /wp-admin/upload.php3.25 ▲0.0234.40 ▲1.89

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 7 new options
New WordPress options
widget_easy-banners-widget
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Easy Banners Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.40 ▲0.051.57 ▼0.0741.31 ▼0.19
Dashboard /wp-admin2,198 ▲215.66 ▼0.0082.19 ▼3.4143.86 ▼1.63
Posts /wp-admin/edit.php2,106 ▲32.01 ▲0.0433.81 ▼0.5034.67 ▼2.11
Add New Post /wp-admin/post-new.php1,541 ▲718.27 ▼4.92590.31 ▲5.1868.16 ▲18.04
Media Library /wp-admin/upload.php1,409 ▲94.20 ▼0.0196.04 ▼1.7443.12 ▼1.50

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_easy-banners-widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: call-to-action, banners-widget, cta, widget, banners

easy-banners-widget/easy-banners-widget.php 92% from 13 tests

"Easy Banners Widget" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Domain Path: The domain path points to a folder that does not exist ("/lang")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin3,291 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript34022911,975
CSS49230683
PHP9275631600
Markdown119033

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity11.60
▷ Minimum class complexity5.00
▷ Maximum class complexity18.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods41
▷ Static methods2253.66%
▷ Public methods3995.12%
▷ Protected methods00.00%
▷ Private methods24.88%
Functions1
▷ Named functions1100.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