79% update-alerts

Code Review | Update Alerts

WordPress plugin Update Alerts scored79%from 54 tests.

About plugin

  • Plugin page: update-alerts
  • Plugin version: 1.3.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.8
  • WordPress version: 6.3.1
  • First release: Aug 21, 2018
  • Latest release: Sep 20, 2018
  • Number of updates: 13
  • Update frequency: every 2.3 days
  • Top authors: porticue (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /601 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.17MB] [CPU: ▼5.13ms] Passed 4 tests

An overview of server-side resources used by Update Alerts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1650.53 ▲1.10
Dashboard /wp-admin3.47 ▲0.1750.28 ▼9.30
Posts /wp-admin/edit.php3.59 ▲0.2350.18 ▲0.04
Add New Post /wp-admin/post-new.php6.07 ▲0.1989.33 ▼12.36
Media Library /wp-admin/upload.php3.40 ▲0.1742.51 ▲4.05
Update Alerts /wp-admin/options-general.php?page=update-alerts3.3636.50

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 26 new files
Database: 1 new table, 7 new options
New tables
wp_update_alerts
New WordPress options
widget_theysaidso_widget
db_upgraded
ua_db_version
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Update Alerts
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲14513.70 ▼0.606.56 ▲4.9059.63 ▲18.39
Dashboard /wp-admin2,232 ▲294.85 ▼0.00102.95 ▼4.5039.67 ▼7.38
Posts /wp-admin/edit.php2,111 ▲142.05 ▲0.0435.20 ▼2.8033.74 ▼1.48
Add New Post /wp-admin/post-new.php1,533 ▲223.28 ▲0.01677.32 ▼3.1857.50 ▲8.85
Media Library /wp-admin/upload.php1,405 ▲84.21 ▲0.0698.80 ▼16.7542.42 ▼7.59
Update Alerts /wp-admin/options-general.php?page=update-alerts8071.536.5028.63

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • ua_db_version
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 0% 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/update-alerts/public/partials/update-alerts-public-display.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/update-alerts/admin/class-update-alerts-admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/update-alerts/admin/partials/update-alerts-admin-display.php:16

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

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: plugin_management, plugin_alerts

update-alerts/update-alerts.php Passed 13 tests

The main PHP script in "Update Alerts" version 1.3.1 is automatically included on every request by WordPress
49 characters long description:
Alert admins to plugin and WordPress core updates

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin725 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP14213758717
JavaScript24546
Markdown1002
CSS2080

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity6.78
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity1.91
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods57
▷ Static methods35.26%
▷ Public methods4782.46%
▷ Protected methods00.00%
▷ Private methods1017.54%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected