84% info-banner

Code Review | Info-Banner

WordPress plugin Info-Banner scored84%from 54 tests.

About plugin

  • Plugin page: info-banner
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.0-4.9.1
  • WordPress version: 6.3.1
  • First release: Nov 26, 2017
  • Latest release: Dec 22, 2017
  • Number of updates: 23
  • Update frequency: every 1.2 days
  • Top authors: philippdalheimer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /908 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.07MB] [CPU: ▼4.52ms] Passed 4 tests

This is a short check of server-side resources used by Info-Banner
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0738.72 ▼0.91
Dashboard /wp-admin3.38 ▲0.0745.21 ▼13.09
Posts /wp-admin/edit.php3.43 ▲0.0748.90 ▲3.87
Add New Post /wp-admin/post-new.php5.96 ▲0.0795.34 ▼7.96
Media Library /wp-admin/upload.php3.30 ▲0.0736.76 ▲4.44

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Info-Banner
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.68 ▼0.731.90 ▲0.0936.27 ▼8.41
Dashboard /wp-admin2,206 ▲154.86 ▼1.19110.27 ▼0.1237.73 ▼8.52
Posts /wp-admin/edit.php2,092 ▲31.97 ▼0.0240.11 ▲4.3833.98 ▼4.86
Add New Post /wp-admin/post-new.php1,533 ▼023.26 ▼0.45646.83 ▲30.8960.27 ▼1.20
Media Library /wp-admin/upload.php1,388 ▼04.16 ▼0.03134.21 ▲31.2251.71 ▲6.85

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_infobanner_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/info-banner/includes/info-banner-class.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/info-banner/includes/info-banner-scripts.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4 in info-banner/assets to your readme.txt
The official readme.txt might help

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

This is the main PHP file of "Info-Banner" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
36 characters long description:
Display your Info-Banner on the site

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
Good job! No executable or dangerous file extensions detected296 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP38945253
CSS18443

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity48.00
▷ Minimum class complexity48.00
▷ Maximum class complexity48.00
Average method complexity12.75
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
PNG images were not found in this plugin