90% basic-banner

Code Review | Basic Banner

WordPress plugin Basic Banner scored 90% from 54 tests.

About plugin

  • Plugin page: basic-banner
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.7.1
  • WordPress version: 6.3.1
  • First release: Oct 28, 2017
  • Latest release: Apr 26, 2021
  • Number of updates: 9
  • Update frequency: every 141.9 days
  • Top authors: hisman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 1,167 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼1.44ms] Passed 4 tests

A check of server-side resources used by Basic Banner
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.04 ▼3.00
Dashboard /wp-admin3.35 ▲0.0555.39 ▲3.82
Posts /wp-admin/edit.php3.46 ▲0.1146.42 ▲3.42
Add New Post /wp-admin/post-new.php5.94 ▲0.0586.22 ▼5.46
Media Library /wp-admin/upload.php3.27 ▲0.0433.97 ▼0.72
Add New /wp-admin/post-new.php?post_type=banner3.3346.93
All Banners /wp-admin/edit.php?post_type=banner3.3134.47

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
widget_basic_banner_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Basic Banner
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲9514.85 ▲0.491.81 ▼0.2542.52 ▼1.83
Dashboard /wp-admin2,230 ▲535.79 ▼0.13102.33 ▼1.7639.46 ▼5.87
Posts /wp-admin/edit.php2,113 ▲352.01 ▲0.0037.17 ▲0.6634.19 ▲1.45
Add New Post /wp-admin/post-new.php1,537 ▲417.72 ▼5.64645.69 ▼9.1061.64 ▲4.45
Media Library /wp-admin/upload.php1,415 ▲244.21 ▲0.0692.45 ▼1.8341.51 ▼2.04
Add New /wp-admin/post-new.php?post_type=banner1,6853.6264.2536.54
All Banners /wp-admin/edit.php?post_type=banner1,1121.9334.0429.91

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_basic_banner_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
1 plugin tags: banner

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

"Basic Banner" version 1.1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
54 characters long description:
Allows you to create and display banners in WordPress.

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 plugin341 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP8107207306
LESS16034
CSS1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity6.75
▷ Minimum class complexity2.00
▷ Maximum class complexity14.00
Average method complexity1.96
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods2291.67%
▷ Protected methods00.00%
▷ Private methods28.33%
Functions3
▷ Named functions3100.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
No PNG files were detected