84% admin-hot-maintenance-mode

Code Review | Admin Hot Maintenance Mode

WordPress plugin Admin Hot Maintenance Mode scored84%from 54 tests.

About plugin

  • Plugin page: admin-hot-mainten...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 27, 2018
  • Latest release: Apr 27, 2018
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: matsuoshi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,398 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

This is a short check of server-side resources used by Admin Hot Maintenance Mode
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.24 ▼2.19
Dashboard /wp-admin3.31 ▼0.0449.60 ▼15.73
Posts /wp-admin/edit.php3.36 ▲0.0051.38 ▼6.32
Add New Post /wp-admin/post-new.php5.89 ▲0.00103.11 ▲2.21
Media Library /wp-admin/upload.php3.23 ▲0.0035.11 ▼1.34

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Admin Hot Maintenance Mode
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.59 ▲0.281.71 ▼0.1242.53 ▲2.55
Dashboard /wp-admin2,195 ▲155.64 ▼0.0683.55 ▼13.0740.89 ▼2.20
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0038.70 ▼1.9436.00 ▼3.84
Add New Post /wp-admin/post-new.php1,545 ▼123.30 ▼0.09604.94 ▼66.2656.39 ▲4.83
Media Library /wp-admin/upload.php1,400 ▲34.23 ▲0.00100.43 ▼0.8945.67 ▼0.62

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/admin-hot-maintenance-mode/admin-hot-maintenance-mode.php:11

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: maintenance, maintenance mode

admin-hot-maintenance-mode/admin-hot-maintenance-mode.php Passed 13 tests

The entry point to "Admin Hot Maintenance Mode" version 1.0.0 is a PHP file that has certain tags in its header comment area
72 characters long description:
Maintenance Mode for Non-administrator login users (editor, writer etc.)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected32 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15819
CSS12013

PHP code Passed 2 tests

This is a very shot 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.14
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%
Functions1
▷ Named functions1100.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
PNG images were not found in this plugin