10% internet-connection-test

Code Review | Internet Connection Test

WordPress plugin Internet Connection Test scored10%from 54 tests.

About plugin

  • Plugin page: internet-connecti...
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8
  • WordPress version: 6.3.1
  • First release: Feb 12, 2014
  • Latest release: Mar 2, 2014
  • Number of updates: 7
  • Update frequency: every 2.6 days
  • Top authors: aabweber (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,551 total downloads

Benchmarks

Plugin footprint 58% 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/internet-connection-test/speed_test.php+43
    Methods with the same name as their class will not be constructors in a future version of PHP; SpeedTestWidget has a deprecated constructor

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.81ms] Passed 4 tests

This is a short check of server-side resources used by Internet Connection Test
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0341.41 ▲4.60
Dashboard /wp-admin3.32 ▲0.0245.23 ▼2.15
Posts /wp-admin/edit.php3.37 ▲0.0146.84 ▼2.65
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.11 ▼23.02
Media Library /wp-admin/upload.php3.24 ▲0.0138.08 ▲5.70

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_speedtestwidget
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Internet Connection Test: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,885 ▲15013.99 ▼0.486.07 ▲4.1744.52 ▲2.39
Dashboard /wp-admin2,203 ▲115.90 ▲0.96106.37 ▼5.1038.51 ▼2.66
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0434.64 ▼5.0134.67 ▲0.63
Add New Post /wp-admin/post-new.php1,539 ▲623.18 ▼0.13682.47 ▲4.4758.74 ▲8.79
Media Library /wp-admin/upload.php1,382 ▼64.18 ▼0.0297.77 ▼16.0842.60 ▼5.76

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_speedtestwidget
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/internet-connection-test/spt-widget.php
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: lbl_your_speed in wp-content/plugins/internet-connection-test/spt-widget.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/internet-connection-test/speed_test-setup.php:10
    • > PHP Notice
      Undefined variable: lbl_calculating in wp-content/plugins/internet-connection-test/spt-widget.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/internet-connection-test/speed_test-setup.php:10
    • > PHP Notice
      Undefined variable: lbl_start in wp-content/plugins/internet-connection-test/spt-widget.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: widget, speed test, internet test

internet-connection-test/speed_test.php 92% from 13 tests

"Internet Connection Test" version 0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("internet-connection-test.php" instead of "speed_test.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin270 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3232994
CSS112189
JavaScript28087

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods583.33%
▷ Protected methods00.00%
▷ Private methods116.67%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
cancel.png2.22KB1.16KB▼ 47.84%
retry.png1.63KB0.65KB▼ 59.92%