94% cmaintenancemode

Code Review | cMaintenanceMode

WordPress plugin cMaintenanceMode scored 94% from 54 tests.

About plugin

  • Plugin page: cmaintenancemode
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.0-4.3.1
  • WordPress version: 5.8.1
  • First release: Nov 23, 2015
  • Latest release: Nov 23, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: cys_ek (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 458 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼176.63ms] Passed 4 tests

Server-side resources used by cMaintenanceMode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.0435.36 ▼9.56
Dashboard /wp-admin3.06 ▲0.0150.15 ▼5.63
Posts /wp-admin/edit.php3.11 ▲0.0151.93 ▼2.94
Add New Post /wp-admin/post-new.php5.42 ▼0.0297.21 ▼688.39
Media Library /wp-admin/upload.php3.00 ▲0.0038.86 ▼0.85

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by cMaintenanceMode
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,686 ▲9015.81 ▲0.1711.92 ▲1.1256.01 ▲1.84
Dashboard /wp-admin2,971 ▲346.11 ▲0.15152.86 ▼29.33126.93 ▼2.83
Posts /wp-admin/edit.php2,743 ▲42.70 ▼0.0266.52 ▼12.51101.77 ▼5.23
Add New Post /wp-admin/post-new.php1,503 ▼7818.47 ▲0.86391.59 ▼57.94118.25 ▼22.75
Media Library /wp-admin/upload.php1,811 ▲15.04 ▼0.02155.41 ▼20.52132.66 ▼12.29

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/cmaintenancemode/cMaintenanceMode-AdminNotice.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bloginfo() in wp-content/plugins/cmaintenancemode/cMaintenanceMode-Page.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cmaintenancemode/cMaintenanceMode.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/cmaintenancemode/cMaintenanceMode-PageNotice.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: spam, comments

cmaintenancemode/cMaintenanceMode.php 85% from 13 tests

"cMaintenanceMode" version 0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cmaintenancemode.php" instead of "cMaintenanceMode.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected105 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PO File2121364
PHP4161641

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.50
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin