90% sitewide-notice-wp

Code Review | Sitewide Notice WP

WordPress plugin Sitewide Notice WP scored90%from 54 tests.

About plugin

  • Plugin page: sitewide-notice-wp
  • Plugin version: 2.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3
  • WordPress version: 6.3.1
  • First release: Mar 12, 2016
  • Latest release: Aug 11, 2023
  • Number of updates: 108
  • Update frequency: every 25.1 days
  • Top authors: andrewza (99.07%)yoohooplugins (1.85%)

Code review

54 tests

User reviews

14 reviews

Install metrics

4,000+ active /47,969 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.79ms] Passed 4 tests

Analyzing server-side resources used by Sitewide Notice WP
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0044.48 ▲1.08
Dashboard /wp-admin3.31 ▲0.0143.47 ▼6.66
Posts /wp-admin/edit.php3.36 ▲0.0046.47 ▼1.51
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.47 ▼11.09
Media Library /wp-admin/upload.php3.23 ▲0.0033.75 ▲0.09
Sitewide Notice WP /wp-admin/options-general.php?page=sitewide-notice-settings3.2029.17

Server storage [IO: ▲0.03MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Sitewide Notice WP
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.85 ▲0.601.57 ▼0.3039.88 ▼4.11
Dashboard /wp-admin2,210 ▲194.84 ▼0.97103.16 ▼16.1840.41 ▼5.68
Posts /wp-admin/edit.php2,096 ▲71.99 ▼0.0039.23 ▲2.6734.32 ▼1.89
Add New Post /wp-admin/post-new.php1,536 ▲823.23 ▲5.02627.39 ▼24.3251.39 ▼8.03
Media Library /wp-admin/upload.php1,392 ▲44.21 ▲0.0198.43 ▲4.1140.80 ▼2.73
Sitewide Notice WP /wp-admin/options-general.php?page=sitewide-notice-settings1,1952.4556.6827.14

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

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

Smoke tests Passed 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)
Even though everything seems fine, this is not 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

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
Please fix the following attributes:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
You can take inspiration from this readme.txt

sitewide-notice-wp/sitewide-notice-wp.php Passed 13 tests

The main file in "Sitewide Notice WP" v. 2.4.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
59 characters long description:
Adds a simple message bar to the front-end of your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin433 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP27258303
JavaScript22523128
CSS1031
SVG1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity22.50
▷ Minimum class complexity20.00
▷ Maximum class complexity25.00
Average method complexity4.91
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods654.55%
▷ Public methods872.73%
▷ Protected methods00.00%
▷ Private methods327.27%
Functions0
▷ Named functions00.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
There were not PNG files found in your plugin