78% wp-post-notification

Code Review | WP Flash News Notification

WordPress plugin WP Flash News Notification scored78%from 54 tests.

About plugin

  • Plugin page: wp-post-notification
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: May 27, 2020
  • Latest release: Sep 27, 2023
  • Number of updates: 6
  • Update frequency: every 202.8 days
  • Top authors: india-web-developer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /502 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by WP Flash News Notification
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.71 ▼0.19
Dashboard /wp-admin3.33 ▲0.0347.47 ▼1.12
Posts /wp-admin/edit.php3.38 ▲0.0247.66 ▼6.36
Add New Post /wp-admin/post-new.php5.91 ▲0.03101.20 ▲0.19
Media Library /wp-admin/upload.php3.25 ▲0.0236.69 ▼2.35
WP Post Notification /wp-admin/options-general.php?page=wpn3.2834.99

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WP Flash News Notification
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,936 ▲20113.59 ▼0.635.32 ▲3.2446.12 ▼1.60
Dashboard /wp-admin2,224 ▲365.86 ▼0.03103.43 ▼12.0843.79 ▲1.11
Posts /wp-admin/edit.php2,107 ▲181.98 ▼0.0039.45 ▲2.6031.98 ▼0.41
Add New Post /wp-admin/post-new.php1,553 ▲2018.68 ▼4.86657.65 ▼20.1059.06 ▲5.88
Media Library /wp-admin/upload.php1,406 ▲214.21 ▼0.00105.84 ▼10.6146.15 ▼2.00
WP Post Notification /wp-admin/options-general.php?page=wpn1,1242.0528.1640.20

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpn
    • > Warning in wp-content/plugins/wp-post-notification/lib/settings.php+63
    in_array() expects parameter 2 to be array, bool given

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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/wp-post-notification/lib/settings.php:11

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

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: Please describe screenshot #2 in wp-post-notification/assets to your readme.txt
  • Screenshots: Screenshot #5 (Front-end Preview) image not found
You can take inspiration from this readme.txt

wp-post-notification/wp-post-notification.php Passed 13 tests

"WP Flash News Notification" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
29 characters long description:
Show blog post in a smart way

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
Good job! No executable or dangerous file extensions detected460 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP34596433
CSS22416
JavaScript10111

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity51.00
▷ Minimum class complexity51.00
▷ Maximum class complexity51.00
Average method complexity4.57
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods428.57%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/close-lf.png2.85KB0.27KB▼ 90.62%