84% notice-interceptor

Code Review | Notice Interceptor

WordPress plugin Notice Interceptor scored84%from 54 tests.

About plugin

  • Plugin page: notice-interceptor
  • Plugin version: 4.24
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Mar 27, 2021
  • Latest release: Sep 12, 2023
  • Number of updates: 21
  • Update frequency: every 42.8 days
  • Top authors: wpgear (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /757 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
Install script ran successfully

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

A check of server-side resources used by Notice Interceptor
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0236.62 ▼0.97
Dashboard /wp-admin3.33 ▲0.0345.89 ▼2.16
Posts /wp-admin/edit.php3.38 ▲0.0348.28 ▲1.50
Add New Post /wp-admin/post-new.php5.93 ▲0.05106.56 ▲18.54
Media Library /wp-admin/upload.php3.25 ▲0.0335.62 ▲3.76
Notice Interceptor /wp-admin/options-general.php?page=notice-interceptor/options.php3.2332.41

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
notice-interceptor_rules
notice-interceptor_autohide
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Notice Interceptor
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,858 ▲11213.25 ▼1.135.10 ▲3.3027.80 ▼18.77
Dashboard /wp-admin2,239 ▲514.91 ▲0.04115.04 ▲10.8744.19 ▲2.79
Posts /wp-admin/edit.php2,125 ▲362.09 ▲0.1051.43 ▲12.9438.72 ▲5.80
Add New Post /wp-admin/post-new.php1,372 ▼16116.78 ▼6.35517.07 ▼205.8450.45 ▼8.11
Media Library /wp-admin/upload.php1,421 ▲304.26 ▲0.06109.05 ▲4.5648.24 ▲1.75
Notice Interceptor /wp-admin/options-general.php?page=notice-interceptor/options.php8741.7631.8829.39

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • 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
Even though no errors were found, this is by no means an exhaustive test

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 take a closer look at the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/notice-interceptor/options.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_current_user() in wp-content/plugins/notice-interceptor/includes/ajax_notice.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/notice-interceptor/notice-interceptor.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
  • Donate link: Invalid url: "wpgear.xyz/notice-interceptor/"
You can look at the official readme.txt

notice-interceptor/notice-interceptor.php Passed 13 tests

"Notice Interceptor" version 4.24's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
113 characters long description:
Tool for creating a comfortable living environment in the Admin area without annoying notifications and ad units.

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 plugin660 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1917280
PHP58655267
CSS104113

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions6
▷ Named functions6100.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
There are no PNG files in this plugin