84% admin-notices-manager

Code Review | Admin Notices Manager

WordPress plugin Admin Notices Manager scored84%from 54 tests.

About plugin

  • Plugin page: admin-notices-man...
  • Plugin version: 1.4.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 26, 2020
  • Latest release: Sep 30, 2023
  • Number of updates: 31
  • Update frequency: every 36.6 days
  • Top authors: WPWhiteSecurity (93.55%)robert681 (9.68%)

Code review

54 tests

User reviews

9 reviews

Install metrics

3,000+ active /19,652 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼6.72ms] Passed 4 tests

Server-side resources used by Admin Notices Manager
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.97 ▲1.31
Dashboard /wp-admin3.39 ▲0.0946.73 ▼3.00
Posts /wp-admin/edit.php3.50 ▲0.1544.34 ▼3.68
Add New Post /wp-admin/post-new.php5.99 ▲0.1084.82 ▼21.52
Media Library /wp-admin/upload.php3.31 ▲0.0836.30 ▲2.45
Admin Notices /wp-admin/options-general.php?page=admin_notices_settings3.2832.64

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 120 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
anm-notices

Browser metrics Passed 4 tests

Checking browser requirements for Admin Notices Manager
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,896 ▲12513.32 ▼1.298.14 ▲6.3341.66 ▲1.90
Dashboard /wp-admin2,284 ▲935.09 ▲0.17115.54 ▲13.7738.70 ▼4.56
Posts /wp-admin/edit.php2,172 ▲832.41 ▲0.3948.82 ▲13.8832.73 ▼3.14
Add New Post /wp-admin/post-new.php1,568 ▲4023.41 ▲4.97667.70 ▲22.7536.39 ▼34.54
Media Library /wp-admin/upload.php1,462 ▲774.40 ▲0.27105.71 ▼15.3141.29 ▼5.75
Admin Notices /wp-admin/options-general.php?page=admin_notices_settings1,2612.6569.6238.15

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/admin-notices-manager/admin-notices-manager.php:39

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 undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: notices, admin notices, hide admin notices, dashboard notices, manage admin notices

admin-notices-manager/admin-notices-manager.php 92% from 13 tests

The main PHP script in "Admin Notices Manager" version 1.4.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Requires PHP: Required version must match the one declared in readme.txt ("7.2.0" instead of "7.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin21,346 lines of code in 107 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript732,69381310,460
JSON4007,522
PHP204409892,166
CSS5873516
Markdown2460294
PO File29397256
Sass1230132

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity37.10
▷ Minimum class complexity1.00
▷ Maximum class complexity157.00
Average method complexity4.86
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods88
▷ Static methods2932.95%
▷ Public methods7382.95%
▷ Protected methods1011.36%
▷ Private methods55.68%
Functions17
▷ Named functions1376.47%
▷ Anonymous functions423.53%
Constants4
▷ Global constants4100.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