10% onoffline

Code Review | onOffline

WordPress plugin onOffline scored10%from 54 tests.

About plugin

  • Plugin page: onoffline
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.1.1
  • WordPress version: 6.3.1
  • First release: Jan 31, 2015
  • Latest release: Feb 21, 2015
  • Number of updates: 13
  • Update frequency: every 1.7 days
  • Top authors: plugin.builders (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /730 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
    • > Warning in wp-content/plugins/onoffline/onOffline.php+33
    sizeof(): Parameter must be an array or an object that implements Countable

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

An overview of server-side resources used by onOffline
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.64 ▲0.07
Dashboard /wp-admin3.31 ▲0.0046.83 ▼1.51
Posts /wp-admin/edit.php3.36 ▲0.0047.49 ▼3.17
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.65 ▼17.93
Media Library /wp-admin/upload.php3.23 ▲0.0035.28 ▲0.64

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by onOffline
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.117.40 ▲5.6543.64 ▼0.66
Dashboard /wp-admin2,206 ▲154.82 ▼0.07103.30 ▼2.1341.20 ▲1.28
Posts /wp-admin/edit.php2,089 ▼32.04 ▼0.0038.12 ▼6.4933.72 ▼4.44
Add New Post /wp-admin/post-new.php1,372 ▼14716.70 ▼6.49601.20 ▼39.4148.03 ▼5.01
Media Library /wp-admin/upload.php1,388 ▲34.15 ▼0.0896.68 ▼9.0342.06 ▼6.61

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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 output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/onoffline/templates/templates.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/onoffline/onOffline.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: There are too many tags (14 tag instead of maximum 10)
The official readme.txt is a good inspiration

onoffline/onOffline.php 92% from 13 tests

The entry point to "onOffline" version 0.2 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("onoffline.php" instead of "onOffline.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin1,814 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
CSS11962211,421
PHP25033276
JavaScript4242117

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.22
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods22100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin