84% schedule-notice-banner

Code Review | Schedule Notice Banner

WordPress plugin Schedule Notice Banner scored84%from 54 tests.

About plugin

  • Plugin page: schedule-notice-b...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.1.1
  • WordPress version: 6.3.1
  • First release: Jul 1, 2019
  • Latest release: Jul 1, 2019
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: altoin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /493 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼0.41ms] Passed 4 tests

An overview of server-side resources used by Schedule Notice Banner
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.43 ▲2.63
Dashboard /wp-admin3.35 ▲0.0149.78 ▼11.50
Posts /wp-admin/edit.php3.47 ▲0.1249.30 ▲6.46
Add New Post /wp-admin/post-new.php5.94 ▲0.05101.99 ▲9.38
Media Library /wp-admin/upload.php3.26 ▲0.0336.60 ▲0.77

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Schedule Notice Banner
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,065 ▲31915.34 ▲0.955.70 ▲3.7538.00 ▼4.73
Dashboard /wp-admin2,366 ▲1786.58 ▲0.72134.35 ▲30.3441.53 ▲1.97
Posts /wp-admin/edit.php2,269 ▲1803.50 ▲1.4553.39 ▲18.7635.31 ▲1.40
Add New Post /wp-admin/post-new.php1,532 ▲1323.35 ▲0.15658.54 ▼29.6737.57 ▼29.46
Media Library /wp-admin/upload.php1,405 ▲174.23 ▲0.0187.93 ▼26.2245.01 ▼3.74

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 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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 following issues need your attention
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/schedule-notice-banner/includes/banner-settings.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/schedule-notice-banner/includes/schedule-notice-banner-display-content.php:59
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/schedule-notice-banner/includes/schedule-notice-banner-settings.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/schedule-notice-banner/includes/loadscripts.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: banner, promotions, store notice

schedule-notice-banner/schedule-notice-banner.php 92% from 13 tests

This is the main PHP file of "Schedule Notice Banner" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 193 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,997 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript31781561,532
CSS25531262
PHP55011203

PHP code Passed 2 tests

Analyzing 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.22
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants0
▷ Global constants00.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
No PNG files were detected