84% global-notifications

Code Review | LSD Global Notification

WordPress plugin LSD Global Notification scored84%from 54 tests.

About plugin

  • Plugin page: global-notifications
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9.1
  • WordPress version: 6.3.1
  • First release: Apr 24, 2012
  • Latest release: Jul 25, 2014
  • Number of updates: 24
  • Update frequency: every 34.3 days
  • Top authors: BasMatthee (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,349 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.59ms] Passed 4 tests

An overview of server-side resources used by LSD Global Notification
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.31 ▼3.83
Dashboard /wp-admin3.32 ▲0.0251.04 ▼1.53
Posts /wp-admin/edit.php3.37 ▲0.0249.21 ▲3.56
Add New Post /wp-admin/post-new.php5.90 ▲0.0285.84 ▼11.73
Media Library /wp-admin/upload.php3.25 ▲0.0234.48 ▼1.26

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

LSD Global Notification: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8113.36 ▼1.022.04 ▼0.2843.98 ▼2.86
Dashboard /wp-admin2,222 ▲344.85 ▼1.03103.24 ▼0.8142.81 ▲3.10
Posts /wp-admin/edit.php2,105 ▲162.01 ▼0.0433.42 ▼5.3936.60 ▲0.31
Add New Post /wp-admin/post-new.php1,546 ▲2723.17 ▼0.03651.71 ▼35.3550.34 ▼0.76
Media Library /wp-admin/upload.php1,401 ▲164.28 ▲0.0897.17 ▼19.9343.16 ▼6.30

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/global-notifications/global_notify.php:21

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Frontend screenshot), #2 (Backend screenshot)
Please take inspiration from this readme.txt

global-notifications/global_notify.php 92% from 13 tests

The main file in "LSD Global Notification" v. 1.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("global-notifications.php" instead of "global_notify.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected65 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP146965

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.37
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png13.83KB4.45KB▼ 67.83%
screenshot-1.png43.52KB15.23KB▼ 65.01%