84% enable-maintenance-page

Code Review | Enable Maintenance Page

WordPress plugin Enable Maintenance Page scored84%from 54 tests.

About plugin

  • Plugin page: enable-maintenanc...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-5.5
  • WordPress version: 6.3.1
  • First release: Sep 26, 2020
  • Latest release: Sep 28, 2020
  • Number of updates: 7
  • Update frequency: every 0.9 days
  • Top authors: kharisblank (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /529 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.98ms] Passed 4 tests

An overview of server-side resources used by Enable Maintenance Page
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0453.18 ▲6.75
Dashboard /wp-admin3.35 ▲0.0449.29 ▼3.44
Posts /wp-admin/edit.php3.40 ▲0.0451.61 ▲0.16
Add New Post /wp-admin/post-new.php5.93 ▲0.0484.77 ▼26.30
Media Library /wp-admin/upload.php3.27 ▲0.0434.32 ▼2.34

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

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

Browser metrics Passed 4 tests

Enable Maintenance Page: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.23 ▼0.131.98 ▲0.4043.81 ▲2.95
Dashboard /wp-admin2,198 ▲185.66 ▲0.0684.74 ▼7.2840.27 ▼5.83
Posts /wp-admin/edit.php2,100 ▼31.98 ▲0.0239.77 ▼1.6035.61 ▼2.81
Add New Post /wp-admin/post-new.php1,528 ▲222.96 ▼0.73681.64 ▼6.8451.33 ▼2.61
Media Library /wp-admin/upload.php1,394 ▼64.16 ▼0.0097.53 ▼0.3944.51 ▲0.98

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/enable-maintenance-page/include/render-template.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/enable-maintenance-page/enable-maintenance-page.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
Please take inspiration from this readme.txt

enable-maintenance-page/enable-maintenance-page.php Passed 13 tests

The main PHP file in "Enable Maintenance Page" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
138 characters long description:
WordPress plugin that helps quickly enable maintenance mode for visitors and display content from a specific page during maintenance mode.

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
Everything looks great! No dangerous files found in this plugin198 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP28586179
CSS14319

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.26
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity1.87
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected