72% sensorpress-uptime-monitoring

Code Review | SensorPress

WordPress plugin SensorPress scored72%from 54 tests.

About plugin

  • Plugin page: sensorpress-uptim...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.7.1
  • WordPress version: 6.3.1
  • First release: Dec 6, 2013
  • Latest release: Dec 6, 2013
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: brewlabs (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active /1,874 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by SensorPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0233.72 ▼7.40
Dashboard /wp-admin3.32 ▲0.0248.02 ▲1.65
Posts /wp-admin/edit.php3.37 ▲0.0246.22 ▲0.60
Add New Post /wp-admin/post-new.php5.90 ▲0.0292.88 ▲3.61
Media Library /wp-admin/upload.php3.25 ▲0.0236.65 ▲3.22
SensorPress /wp-admin/options-general.php?page=sensorpress3.2629.43

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for SensorPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲16714.08 ▼0.504.73 ▲2.7938.39 ▼5.12
Dashboard /wp-admin2,210 ▲195.86 ▲1.00107.15 ▲2.0440.76 ▼6.17
Posts /wp-admin/edit.php2,093 ▲11.97 ▼0.0639.30 ▼1.6235.07 ▼1.94
Add New Post /wp-admin/post-new.php1,545 ▲3118.46 ▲0.93636.21 ▼18.2455.39 ▼2.97
Media Library /wp-admin/upload.php1,392 ▲44.21 ▼0.0198.63 ▼6.5842.29 ▲1.12
SensorPress /wp-admin/options-general.php?page=sensorpress8432.1922.8625.42

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=sensorpress
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=sensorpress
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=sensorpress
    • > Notice in wp-content/plugins/sensorpress-uptime-monitoring/admin/views/admin.php+71
    Undefined index: email
    • > GET request to /wp-admin/options-general.php?page=sensorpress
    • > Notice in wp-content/plugins/sensorpress-uptime-monitoring/admin/views/admin.php+77
    Undefined index: site-key
    • > GET request to /wp-admin/options-general.php?page=sensorpress
    • > Notice in wp-content/plugins/sensorpress-uptime-monitoring/admin/views/admin.php+82
    Undefined index: enable

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/sensorpress-uptime-monitoring/public/views/public.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sensorpress-uptime-monitoring/admin/views/admin.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (Quick Setup) image not found
Please take inspiration from this readme.txt

sensorpress-uptime-monitoring/sensorpress-uptime-monitoring.php 92% from 13 tests

The main PHP script in "SensorPress" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
There were no executable files found in this plugin258 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP7122418248
JavaScript28210
CSS2020

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity8.50
▷ Minimum class complexity6.00
▷ Maximum class complexity11.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods25
▷ Static methods728.00%
▷ Public methods2080.00%
▷ Protected methods00.00%
▷ Private methods520.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin