84% wp-admin-notice

Code Review | WP Admin Notice

WordPress plugin WP Admin Notice scored84%from 54 tests.

About plugin

  • Plugin page: wp-admin-notice
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.2
  • WordPress version: 6.3.1
  • First release: Dec 29, 2015
  • Latest release: Dec 29, 2015
  • Number of updates: 5
  • Update frequency: every 0.8 days
  • Top authors: aiddroid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /835 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼10.18ms] Passed 4 tests

A check of server-side resources used by WP Admin Notice
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.79 ▼0.16
Dashboard /wp-admin3.31 ▼0.0351.58 ▼14.85
Posts /wp-admin/edit.php3.37 ▲0.0147.42 ▼6.87
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.96 ▼18.85
Media Library /wp-admin/upload.php3.24 ▲0.0141.00 ▲4.28
WP Admin Notice /wp-admin/options-general.php?page=wp-admin-notice/wp-admin-notice.php3.2634.94

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WP Admin Notice
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6614.72 ▲0.371.64 ▼0.0443.38 ▲2.91
Dashboard /wp-admin2,221 ▲414.81 ▼0.9197.04 ▼11.2441.89 ▼2.56
Posts /wp-admin/edit.php2,125 ▲252.30 ▲0.2939.45 ▼2.3234.99 ▼3.13
Add New Post /wp-admin/post-new.php1,547 ▲1923.23 ▲0.15681.02 ▲63.9039.22 ▼8.88
Media Library /wp-admin/upload.php1,423 ▲204.43 ▲0.2498.47 ▼4.7843.20 ▼0.52
WP Admin Notice /wp-admin/options-general.php?page=wp-admin-notice/wp-admin-notice.php1,0922.5041.5326.18

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-admin-notice/options-page.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-admin-notice/wp-admin-notice.php:29

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, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (/screenshot-1.png) image missing
You can look at the official readme.txt

wp-admin-notice/wp-admin-notice.php Passed 13 tests

The main PHP file in "WP Admin Notice" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
63 characters long description:
This plugin allows you to show a simple notice to alert admins.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin192 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP34670182
JavaScript11210

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions9
▷ Named functions9100.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.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png31.05KB12.58KB▼ 59.48%