83% offline-updater

Code Review | Offline Updater

WordPress plugin Offline Updater scored83%from 54 tests.

About plugin

  • Plugin page: offline-updater
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 19, 2016
  • Latest release: Nov 16, 2019
  • Number of updates: 15
  • Update frequency: every 70.6 days
  • Top authors: playes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /899 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 gracefully, with no errors

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

This is a short check of server-side resources used by Offline Updater
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0139.38 ▼0.91
Dashboard /wp-admin3.32 ▼0.0247.01 ▼19.15
Posts /wp-admin/edit.php3.37 ▲0.0245.08 ▼4.35
Add New Post /wp-admin/post-new.php5.90 ▲0.0282.07 ▼21.26
Media Library /wp-admin/upload.php3.24 ▲0.0233.57 ▲0.44
Offline Updater /wp-admin/index.php?page=offline-updater3.2230.44

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Offline Updater
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.27 ▼0.981.82 ▼0.2444.42 ▲1.92
Dashboard /wp-admin2,210 ▲195.79 ▲0.8997.70 ▼6.8040.58 ▲0.61
Posts /wp-admin/edit.php2,096 ▲41.99 ▼0.0035.12 ▼3.1832.15 ▼1.51
Add New Post /wp-admin/post-new.php1,536 ▲223.10 ▼0.11659.71 ▼43.4152.66 ▼0.16
Media Library /wp-admin/upload.php1,392 ▲74.21 ▼0.0594.48 ▼13.2141.94 ▼0.51
Offline Updater /wp-admin/index.php?page=offline-updater7792.0224.1727.20

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/offline-updater/offline-updater.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (setting) image not found
You can look at the official readme.txt

offline-updater/offline-updater.php 92% from 13 tests

The primary PHP file in "Offline Updater" version 1.3 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 204 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected70 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP19870

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity5.67
▷ Minimum method complexity2.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.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 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.29MB with 0.29MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
(invalid) screenshot-1.png301.01KB0.00KB▼ 100.00%