84% offline-indicator

Code Review | Offline Indicator

WordPress plugin Offline Indicator scored84%from 54 tests.

About plugin

  • Plugin page: offline-indicator
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.6
  • WordPress version: 6.3.1
  • First release: Oct 30, 2013
  • Latest release: Oct 30, 2013
  • Number of updates: 9
  • Update frequency: N/A
  • Top authors: subharanjan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,018 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.57ms] Passed 4 tests

A check of server-side resources used by Offline Indicator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.13 ▲1.78
Dashboard /wp-admin3.31 ▲0.0147.29 ▲1.19
Posts /wp-admin/edit.php3.36 ▲0.0044.81 ▲1.24
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.61 ▼9.59
Media Library /wp-admin/upload.php3.23 ▲0.0034.83 ▲0.87

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Offline Indicator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.30 ▼1.081.86 ▲0.2043.98 ▲3.63
Dashboard /wp-admin2,215 ▲244.92 ▲0.03118.48 ▲16.1644.51 ▲3.80
Posts /wp-admin/edit.php2,115 ▲262.09 ▲0.0738.97 ▲3.8243.19 ▲7.57
Add New Post /wp-admin/post-new.php1,525 ▼317.47 ▼0.93693.44 ▲94.1357.17 ▲7.66
Media Library /wp-admin/upload.php1,408 ▲174.27 ▲0.07102.71 ▲5.9042.88 ▼3.70

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/offline-indicator/wordpress-offline-indicator.php:41

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 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
9 plugin tags: offline alert, offline indicator, currently offline, connection lost message, reconnecting...

offline-indicator/wordpress-offline-indicator.php 85% from 13 tests

The entry point to "Offline Indicator" version 0.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 323 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("offline-indicator.php" instead of "wordpress-offline-indicator.php")

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
Good job! No executable or dangerous file extensions detected1,868 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
CSS1020211,810
PHP2235044
JavaScript25114

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods360.00%
▷ Protected methods00.00%
▷ Private methods240.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected