74% wp-nag-hide

Code Review | WP Nag Hide

WordPress plugin WP Nag Hide scored74%from 54 tests.

About plugin

  • Plugin page: wp-nag-hide
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.3
  • WordPress version: 6.3.1
  • First release: Feb 9, 2017
  • Latest release: Feb 9, 2017
  • Number of updates: 17
  • Update frequency: every 2.9 days
  • Top authors: notime00 (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

6,000+ active /29,944 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.77MB] [CPU: ▼50.47ms] Passed 4 tests

Analyzing server-side resources used by WP Nag Hide
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0743.22 ▲4.09
Dashboard /wp-admin2.17 ▼1.1311.23 ▼42.23
Posts /wp-admin/edit.php2.17 ▼1.1810.29 ▼37.97
Add New Post /wp-admin/post-new.php2.17 ▼3.729.26 ▼92.76
Media Library /wp-admin/upload.php2.17 ▼1.069.31 ▼28.92

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Nag Hide
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.62 ▲0.081.68 ▼0.0141.83 ▲4.60
Dashboard /wp-admin2,205 ▲275.53 ▼0.1280.77 ▼18.4140.16 ▲1.40
Posts /wp-admin/edit.php2,111 ▲142.02 ▲0.0233.23 ▼2.8433.73 ▼1.48
Add New Post /wp-admin/post-new.php1,535 ▲423.14 ▲0.10650.17 ▼24.4848.88 ▼13.28
Media Library /wp-admin/upload.php1,410 ▲74.17 ▼0.0295.20 ▼13.1841.52 ▼6.89

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the WP_HPUW_admin_style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • WP_HPUW
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-nag-hide/nag.php:370

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

wp-nag-hide/nag.php 92% from 13 tests

"WP Nag Hide" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-nag-hide.php" instead of "nag.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin428 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP15532309
PO File2181872
CSS12047

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity40.00
▷ Minimum class complexity40.00
▷ Maximum class complexity40.00
Average method complexity3.79
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods964.29%
▷ Protected methods00.00%
▷ Private methods535.71%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo.png3.57KB1.96KB▼ 45.12%
images/switch_on.png3.95KB2.06KB▼ 47.81%
images/switch_off.png3.40KB2.16KB▼ 36.46%