83% instant

Code Review | Unless

WordPress plugin Unless scored83%from 54 tests.

About plugin

  • Plugin page: instant
  • Plugin version: 3.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1.1
  • WordPress version: 6.3.1
  • First release: May 8, 2017
  • Latest release: Dec 13, 2022
  • Number of updates: 32
  • Update frequency: every 64.0 days
  • Top authors: centrical (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /9,931 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.05ms] Passed 4 tests

Analyzing server-side resources used by Unless
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.51 ▲2.56
Dashboard /wp-admin3.34 ▲0.0348.32 ▼0.01
Posts /wp-admin/edit.php3.39 ▲0.0349.31 ▼3.89
Add New Post /wp-admin/post-new.php5.92 ▲0.0391.66 ▼14.85
Media Library /wp-admin/upload.php3.26 ▲0.0340.00 ▲4.20
Unless /wp-admin/tools.php?page=unless3.2532.69

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 40 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
unless_data

Browser metrics Passed 4 tests

Unless: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.78 ▲0.431.77 ▲0.0643.65 ▲5.08
Dashboard /wp-admin2,208 ▲285.64 ▲0.0293.15 ▼8.3341.78 ▼5.39
Posts /wp-admin/edit.php2,120 ▲171.96 ▼0.0640.04 ▲6.0733.54 ▲0.27
Add New Post /wp-admin/post-new.php1,543 ▲522.89 ▲4.46656.12 ▼2.2876.73 ▲13.92
Media Library /wp-admin/upload.php1,416 ▲164.25 ▲0.07111.64 ▲2.0244.26 ▼0.38
Unless /wp-admin/tools.php?page=unless1,2331.9930.37125.53

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% 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
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/instant/unless.php
    • > /wp-content/plugins/instant/index.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
Please take inspiration from this readme.txt

instant/unless.php 77% from 13 tests

The primary PHP file in "Unless" version 3.0.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("instant.php" instead of "unless.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: Keep the plugin description shorter than 140 characters (currently 158 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected13,076 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
CSS69255,5405,437
SVG6034,620
JavaScript31101,8792,681
PHP53370338

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.49
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.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.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/unless.png37.40KB12.62KB▼ 66.25%