84% zedna-maintenance-mode

Code Review | Zedna Maintenance Mode

WordPress plugin Zedna Maintenance Mode scored84%from 54 tests.

About plugin

  • Plugin page: zedna-maintenance...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.4
  • WordPress version: 6.3.1
  • First release: Jun 21, 2019
  • Latest release: Mar 12, 2020
  • Number of updates: 12
  • Update frequency: every 22.2 days
  • Top authors: zedna (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /637 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Zedna Maintenance Mode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0531.37 ▼11.45
Dashboard /wp-admin3.34 ▲0.0451.65 ▼7.50
Posts /wp-admin/edit.php3.39 ▲0.0452.97 ▼6.22
Add New Post /wp-admin/post-new.php5.92 ▲0.0499.06 ▼9.68
Media Library /wp-admin/upload.php3.26 ▲0.0436.95 ▲0.23

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Zedna Maintenance Mode
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.41 ▲0.032.05 ▲0.2039.39 ▼5.02
Dashboard /wp-admin2,208 ▲315.59 ▼0.0381.61 ▼10.3240.11 ▼2.29
Posts /wp-admin/edit.php2,113 ▲132.04 ▲0.0539.22 ▲3.0435.68 ▼0.92
Add New Post /wp-admin/post-new.php1,567 ▲3618.29 ▼5.11614.59 ▼77.9047.24 ▼8.83
Media Library /wp-admin/upload.php1,419 ▲194.36 ▲0.1798.27 ▼11.1145.58 ▼0.64

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 9 options
    • can_compress_scripts
    • theysaidso_admin_options
    • zednamm_maintenance_role
    • zednamm_message
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • zednamm_redirect_to_login
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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 fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_option() in wp-content/plugins/zedna-maintenance-mode/zedna-maintenance-mode.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: content, redirect, maintenance, capabilities, roles...

zedna-maintenance-mode/zedna-maintenance-mode.php Passed 13 tests

The primary PHP file in "Zedna Maintenance Mode" version 1.0 is used by WordPress to initiate all plugin functionality
68 characters long description:
Set you website under maintenance to lock content while development.

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
Everything looks great! No dangerous files found in this plugin242 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11729173
PO File1212169

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin