10% uptime-widget

Code Review | Uptime Widget

WordPress plugin Uptime Widget scored10%from 54 tests.

About plugin

  • Plugin page: uptime-widget
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Nov 5, 2013
  • Latest release: Nov 5, 2013
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: ko159 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /735 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/uptime-widget/uptime-widget.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; wp_my_plugin has a deprecated constructor

Server metrics [RAM: ▼1.92MB] [CPU: ▼56.28ms] Passed 4 tests

An overview of server-side resources used by Uptime Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.404.93 ▼40.27
Dashboard /wp-admin2.09 ▼1.225.91 ▼42.47
Posts /wp-admin/edit.php2.09 ▼1.277.16 ▼48.37
Add New Post /wp-admin/post-new.php2.09 ▼3.805.61 ▼94.01
Media Library /wp-admin/upload.php2.09 ▼1.145.00 ▼31.84

Server storage [IO: ▲0.00MB] [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: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_wp_my_plugin
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Uptime Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.37 ▲0.001.76 ▼0.4644.30 ▼0.87
Dashboard /wp-admin2,195 ▲185.65 ▼0.0487.21 ▼4.7138.51 ▼6.13
Posts /wp-admin/edit.php2,100 ▼32.00 ▼0.0340.42 ▼3.2137.78 ▲0.81
Add New Post /wp-admin/post-new.php1,526 ▼517.86 ▼5.33701.30 ▲70.8558.54 ▲10.77
Media Library /wp-admin/upload.php1,400 ▲34.25 ▲0.0296.77 ▼5.3842.11 ▼1.71

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/uptime-widget/uptime-widget.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; wp_my_plugin has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_wp_my_plugin

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/uptime-widget/uptime-widget.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (To be added shortly) image not found
You can look at the official readme.txt

uptime-widget/uptime-widget.php Passed 13 tests

The primary PHP file in "Uptime Widget" version 1.0 is used by WordPress to initiate all plugin functionality
120 characters long description:
A simple plugin that will display a gauge on your sidebar showing the uptime percentage of any website in the past month

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
Success! There were no dangerous files found in this plugin59 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1142159

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin