89% show-notice-or-message-on-admin-area

Code Review | Show notice or message on admin area

WordPress plugin Show notice or message on admin area scored89%from 54 tests.

About plugin

  • Plugin page: show-notice-or-me...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9
  • WordPress version: 6.3.1
  • First release: Feb 8, 2016
  • Latest release: Mar 19, 2018
  • Number of updates: 29
  • Update frequency: every 26.6 days
  • Top authors: mynamevenu24 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /1,551 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.16ms] Passed 4 tests

Server-side resources used by Show notice or message on admin area
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.95 ▲5.64
Dashboard /wp-admin3.31 ▲0.0145.06 ▼3.81
Posts /wp-admin/edit.php3.36 ▲0.0147.41 ▲0.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.20 ▲1.45
Media Library /wp-admin/upload.php3.23 ▲0.0133.40 ▼2.58
Notice on Dashboard /wp-admin/options-general.php?page=sna-a-dashboard3.2030.84

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Show notice or message on admin area
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲10613.25 ▼1.051.77 ▲0.1844.74 ▲4.40
Dashboard /wp-admin2,244 ▲595.89 ▲1.0098.32 ▼3.8438.12 ▼4.92
Posts /wp-admin/edit.php2,129 ▲402.06 ▲0.0937.93 ▼4.5434.86 ▲2.61
Add New Post /wp-admin/post-new.php1,561 ▲4223.48 ▲0.02628.18 ▼40.5656.38 ▲1.17
Media Library /wp-admin/upload.php1,429 ▲444.23 ▼0.0097.81 ▼5.3345.76 ▲2.30
Notice on Dashboard /wp-admin/options-general.php?page=sna-a-dashboard7972.0523.1227.45

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
Please fix the following items
  • The uninstall procedure has failed, leaving 8 options in the database
    • urgnt_notice
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • nrml_notice
    • can_compress_scripts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (Settings of Notice on dashboard plugin)
Please take inspiration from this readme.txt

show-notice-or-message-on-admin-area/show_notice_on_admin_area.php 92% from 13 tests

Analyzing the main PHP file in "Show notice or message on admin area" version 2.0
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("show-notice-or-message-on-admin-area.php" instead of "show_notice_on_admin_area.php")

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
Good job! No executable or dangerous file extensions detected114 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1312476
CSS13038

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity3.00
▷ Minimum method complexity3.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods1100.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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
1 PNG file occupies 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png57.40KB26.42KB▼ 53.97%