84% wp-plugin-banner

Code Review | WP Plugin Banner

WordPress plugin WP Plugin Banner scored84%from 54 tests.

About plugin

  • Plugin page: wp-plugin-banner
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: Oct 16, 2016
  • Latest release: Oct 16, 2016
  • Number of updates: 4
  • Update frequency: every 2.3 days
  • Top authors: cklosows (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,163 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: ▼4.55ms] Passed 4 tests

This is a short check of server-side resources used by WP Plugin Banner
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0245.71 ▲1.06
Dashboard /wp-admin3.32 ▲0.0250.20 ▲0.15
Posts /wp-admin/edit.php3.38 ▲0.0253.11 ▲2.20
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.35 ▼16.96
Media Library /wp-admin/upload.php3.25 ▲0.0232.55 ▼2.46

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WP Plugin Banner
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,773 ▲1214.62 ▲0.032.15 ▲0.3062.40 ▲21.89
Dashboard /wp-admin2,198 ▲245.59 ▲0.0192.44 ▲2.0643.51 ▲1.24
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0140.73 ▲6.2435.32 ▲2.22
Add New Post /wp-admin/post-new.php1,526 ▼223.06 ▼0.11666.53 ▼5.9958.35 ▲6.63
Media Library /wp-admin/upload.php1,397 ▼04.21 ▲0.0899.00 ▼5.1543.74 ▼2.60

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% 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)
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-plugin-banner/wp-plugin-banner.php:115

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 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
3 plugin tags: banner, wordpressorg, plugin

wp-plugin-banner/wp-plugin-banner.php 85% from 13 tests

The main file in "WP Plugin Banner" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")

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
Everything looks great! No dangerous files found in this plugin106 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1211084
CSS10022

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods360.00%
▷ Protected methods00.00%
▷ Private methods240.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin