78% uptime-robot-by-utopian-themes

Code Review | Uptime Robot

WordPress plugin Uptime Robot scored 78% from 53 tests.

About plugin

  • Plugin page: uptime-robot-by-u...
  • Plugin version: 1.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5.2
  • WordPress version: 5.8.1
  • First release: May 4, 2014
  • Latest release: May 31, 2016
  • Number of updates: 30
  • Update frequency: every 25.3 days
  • Top authors: brianwelch (100%)

Code review

53 tests

User reviews

3 reviews

Install metrics

90+ active / 2,750 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼283.44ms] Passed 4 tests

Server-side resources used by Uptime Robot
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.1736.93 ▲17.12
Dashboard /wp-admin3.08 ▲0.0337.97 ▼8.36
Posts /wp-admin/edit.php3.17 ▲0.0641.76 ▼3.93
Add New Post /wp-admin/post-new.php5.48 ▲0.0584.44 ▼1,118.30
Media Library /wp-admin/upload.php3.06 ▲0.0535.16 ▼3.15
Uptime Robot /wp-admin/options-general.php?page=uptime-robot3.0031.35

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, 1 new option
New WordPress options
widget_uptime_robot_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Uptime Robot
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,774 ▲16915.97 ▲0.467.69 ▼1.0850.88 ▲4.32
Dashboard /wp-admin3,053 ▲2005.96 ▲0.13132.70 ▼4.31102.69 ▼3.23
Posts /wp-admin/edit.php2,713 ▲72.69 ▼0.1361.39 ▼2.1792.17 ▲11.71
Add New Post /wp-admin/post-new.php1,658 ▼19518.68 ▼0.25332.27 ▼29.44105.51 ▼1.91
Media Library /wp-admin/upload.php1,779 ▲105.02 ▲0.02140.68 ▼14.84106.44 ▼8.63
Uptime Robot /wp-admin/options-general.php?page=uptime-robot1,0242.0851.7961.58

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_uptime_robot_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=uptime-robot
    • > User deprecated in wp-includes/functions.php+5221
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=uptime-robot
    • > User deprecated in wp-includes/functions.php+5221
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/uptime-robot-by-utopian-themes/classes/class-widget.php:13

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 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: monitoring, uptime robot, dashboard, widget

uptime-robot-by-utopian-themes/uptime-robot.php 85% from 13 tests

The main file in "Uptime Robot" v. 1.5.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("uptime-robot-by-utopian-themes.php" instead of "uptime-robot.php")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin799 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP750275457
CSS205142
PO File13535101
Markdown142099

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity7.43
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity2.41
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods32
▷ Static methods721.88%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/down.png0.68KB0.72KB0.00%
assets/images/up.png0.76KB0.81KB0.00%
assets/images/unknown.png0.77KB0.82KB0.00%
assets/images/unchecked.png0.69KB0.71KB0.00%
assets/images/paused.png0.58KB0.62KB0.00%