84% internet-connection-status

Code Review | Internet Connection Alert!

WordPress plugin Internet Connection Alert! scored84%from 54 tests.

About plugin

  • Plugin page: internet-connecti...
  • Plugin version: 1.4.3
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Nov 24, 2019
  • Latest release: Dec 7, 2022
  • Number of updates: 17
  • Update frequency: every 65.2 days
  • Top authors: sanzeeb3 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /2,765 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
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼1.85ms] Passed 4 tests

Analyzing server-side resources used by Internet Connection Alert!
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0844.05 ▲4.00
Dashboard /wp-admin3.37 ▲0.0751.30 ▲0.10
Posts /wp-admin/edit.php3.43 ▲0.0748.72 ▼10.01
Add New Post /wp-admin/post-new.php5.96 ▲0.0790.28 ▼1.47
Media Library /wp-admin/upload.php3.30 ▲0.0738.45 ▲4.40
Internet Connection Status /wp-admin/options-general.php?page=internet-connection-status3.2733.65

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Internet Connection Alert!
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲5014.32 ▼0.243.74 ▲1.6337.74 ▼7.68
Dashboard /wp-admin2,199 ▲195.61 ▲0.0188.43 ▼9.3640.87 ▼5.12
Posts /wp-admin/edit.php2,107 ▲71.98 ▼0.0336.05 ▼0.9035.95 ▲0.07
Add New Post /wp-admin/post-new.php1,529 ▲323.72 ▲0.63689.69 ▲25.1756.47 ▲3.28
Media Library /wp-admin/upload.php1,404 ▲44.18 ▼0.03102.28 ▼8.1546.52 ▲2.06
Internet Connection Status /wp-admin/options-general.php?page=internet-connection-status9512.0424.4547.36

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% 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 text when accessed directly:
    • > /wp-content/plugins/internet-connection-status/internet-connection-status.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 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
3 plugin tags: offline, alert, pwa

internet-connection-status/internet-connection-status.php Passed 13 tests

"Internet Connection Alert!" version 1.4.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
70 characters long description:
Automatically alert your users when they've lost internet connectivity

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected4,882 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JSON2003,030
CSS9911491,016
JavaScript52418557
PHP26180279

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/logo.png9.75KB3.76KB▼ 61.46%