84% wp-notice

Code Review | WordPress Notice

WordPress plugin WordPress Notice scored84%from 54 tests.

About plugin

  • Plugin page: wp-notice
  • Plugin version: 1.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.4
  • WordPress version: 6.3.1
  • First release: Jun 14, 2014
  • Latest release: Dec 12, 2015
  • Number of updates: 18
  • Update frequency: every 30.5 days
  • Top authors: barzik (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /1,342 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.16MB] [CPU: ▼2.01ms] Passed 4 tests

Server-side resources used by WordPress Notice
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.44 ▼8.51
Dashboard /wp-admin3.50 ▲0.2048.89 ▲1.28
Posts /wp-admin/edit.php3.62 ▲0.2650.99 ▲7.65
Add New Post /wp-admin/post-new.php6.09 ▲0.1985.78 ▼3.33
Media Library /wp-admin/upload.php3.43 ▲0.1936.36 ▲2.53
WP Notice /wp-admin/options-general.php?page=wp-notice3.3730.42

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WordPress Notice
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲7613.31 ▼1.001.79 ▼0.4336.73 ▼11.66
Dashboard /wp-admin2,210 ▲225.04 ▼0.75103.96 ▼4.5438.15 ▲0.30
Posts /wp-admin/edit.php2,090 ▲222.02 ▲0.0436.98 ▲0.5533.98 ▼1.10
Add New Post /wp-admin/post-new.php1,536 ▲1723.17 ▼0.20656.99 ▼27.6061.07 ▲6.98
Media Library /wp-admin/upload.php1,395 ▲74.24 ▼0.0297.41 ▼11.7443.90 ▼1.98
WP Notice /wp-admin/options-general.php?page=wp-notice3,7472.1339.7344.74

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=wp-notice
    • > Notice in wp-content/plugins/wp-notice/admin/class-wp-notice-admin.php+227
    Undefined index: wp_notice

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

User-side errors Passed 1 test

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

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
8 plugin tags: obsolete, font awesome, animation, notification, notice...

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

Analyzing the main PHP file in "WordPress Notice" version 1.3.4
128 characters long description:
WP Notice Plugin enables admin to put custom animated announcements in the beginning of posts based on date, categories or tags.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected3,721 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
CSS6168162,188
PHP101074571,301
JavaScript1227116
PO File1333491
XML12025

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity48.00
▷ Minimum class complexity32.00
▷ Maximum class complexity64.00
Average method complexity3.76
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes2100.00%
Methods34
▷ Static methods38.82%
▷ Public methods1852.94%
▷ Protected methods00.00%
▷ Private methods1647.06%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
No PNG files were detected