84% uptime-robot-widget

Code Review | Uptime Robot Widget

WordPress plugin Uptime Robot Widget scored84%from 54 tests.

About plugin

  • Plugin page: uptime-robot-widget
  • Plugin version: 1.8.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.4
  • WordPress version: 6.3.1
  • First release: May 28, 2015
  • Latest release: May 8, 2020
  • Number of updates: 110
  • Update frequency: every 20.6 days
  • Top authors: Beherit (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

80+ active /4,894 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.61MB] [CPU: ▼16.73ms] Passed 4 tests

Analyzing server-side resources used by Uptime Robot Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0636.42 ▼4.72
Dashboard /wp-admin3.41 ▲0.0750.19 ▼0.74
Posts /wp-admin/edit.php3.53 ▲0.1352.84 ▼3.05
Add New Post /wp-admin/post-new.php3.29 ▼2.6440.37 ▼56.00
Media Library /wp-admin/upload.php3.34 ▲0.0734.38 ▼3.13
Uptime Robot Widget /wp-admin/options-general.php?page=uptime-robot-settings3.2830.20

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_uptimerobot_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Uptime Robot Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.24 ▼0.291.93 ▼0.0140.03 ▼5.25
Dashboard /wp-admin2,202 ▲225.64 ▼0.0292.27 ▼7.4141.47 ▼3.40
Posts /wp-admin/edit.php2,107 ▲71.99 ▼0.0339.60 ▲4.3236.72 ▲4.24
Add New Post /wp-admin/post-new.php1,529 ▲323.01 ▲0.05658.25 ▲13.2552.72 ▼5.91
Media Library /wp-admin/upload.php1,401 ▼24.19 ▲0.0395.11 ▲0.3641.12 ▼1.63
Uptime Robot Widget /wp-admin/options-general.php?page=uptime-robot-settings9352.0423.8026.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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_uptimerobot_widget
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=uptime-robot-settings
    • > Notice in wp-content/plugins/uptime-robot-widget/includes/settings.php+119
    Undefined index: settings-updated

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 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
7 plugin tags: server monitoring, uptimerobot, uptime robot, widget, uptime monitoring...

uptime-robot-widget/uptime-robot.php 92% from 13 tests

This is the main PHP file of "Uptime Robot Widget" version 1.8.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("uptime-robot-widget.php" instead of "uptime-robot.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin366 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP41763305
CSS20043
JavaScript20018

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin