79% no-browser-nag

Code Review | No Browser Nag

WordPress plugin No Browser Nag scored79%from 54 tests.

About plugin

  • Plugin page: no-browser-nag
  • Plugin version: 1.3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-5.8
  • WordPress version: 6.3.1
  • First release: Jul 6, 2011
  • Latest release: Oct 12, 2021
  • Number of updates: 15
  • Update frequency: every 295.3 days
  • Top authors: coffee2code (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /3,908 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
Installer ran successfully

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

A check of server-side resources used by No Browser Nag
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.70 ▲0.10
Dashboard /wp-admin3.31 ▼0.0446.08 ▼18.98
Posts /wp-admin/edit.php3.36 ▲0.0147.02 ▼3.50
Add New Post /wp-admin/post-new.php5.89 ▲0.0195.64 ▼5.13
Media Library /wp-admin/upload.php3.23 ▲0.0038.96 ▲5.50

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for No Browser Nag
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.21 ▼1.101.79 ▼0.0344.61 ▼0.60
Dashboard /wp-admin2,209 ▲214.79 ▼0.1199.15 ▼15.6540.23 ▼2.49
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.0239.44 ▲2.4335.88 ▲1.63
Add New Post /wp-admin/post-new.php1,542 ▲2818.24 ▼5.40640.87 ▼71.9458.69 ▼2.43
Media Library /wp-admin/upload.php1,379 ▼34.16 ▼0.0398.45 ▼32.3940.57 ▼8.27

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/no-browser-nag/tests/phpunit/bootstrap.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/tests/phpunit/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/no-browser-nag/tests/phpunit/bootstrap.php on line 29
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/tests/phpunit/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/no-browser-nag/tests/phpunit/bootstrap.php on line 29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
6 plugin tags: coffee2code, upgrade, nag, notices, admin...

no-browser-nag/no-browser-nag.php Passed 13 tests

This is the main PHP file of "No Browser Nag" version 1.3.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
110 characters long description:
Removes the browser update nag that appears in the admin dashboard when using a less-than-current web browser.

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
Good job! No executable or dangerous file extensions detected239 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
Markdown3310106
PHP4549298
Bourne Shell16221
XML10014

PHP code Passed 2 tests

This is a very shot 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.21
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.09
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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