10% easy-pie-maintenance-mode

Code Review | EZP Maintenance Mode

WordPress plugin EZP Maintenance Mode scored 10% from 54 tests.

About plugin

  • Plugin page: easy-pie-maintena...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.1.1
  • WordPress version: 5.9.2
  • First release: Oct 30, 2013
  • Latest release: Oct 22, 2016
  • Number of updates: 77
  • Update frequency: every 14.1 days
  • Top authors: bobriley (100%)

Code review

54 tests

User reviews

46 reviews

Install metrics

10,000+ active / 191,653 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/easy-pie-maintenance-mode/classes/class-easy-pie-mm.php+253
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.12MB] [CPU: ▼291.43ms] Passed 4 tests

Analyzing server-side resources used by EZP Maintenance Mode
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.1856.50 ▲5.52
Dashboard /wp-admin3.56 ▲0.1534.48 ▲0.63
Posts /wp-admin/edit.php3.78 ▲0.1439.11 ▼2.95
Add New Post /wp-admin/post-new.php7.02 ▲0.0594.47 ▼1,164.06
Media Library /wp-admin/upload.php3.44 ▲0.1426.16 ▲0.67
Maintenance Mode /wp-admin/options-general.php?page=easy-pie-maintenance-mode3.4625.27

Server storage [IO: ▲0.81MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please try to fix the following items
  • Illegal file modification found: 1 file (0.00KB) outside of "wp-content/plugins/easy-pie-maintenance-mode/" and "wp-content/uploads/"
    • (new file) wp-content/easy-pie-maintenance-mode/mini-themes/.empty
Filesystem: 48 new files
Database: no new tables, 1 new option
New WordPress options
easy-pie-mm-options

Browser metrics Passed 4 tests

This is an overview of browser requirements for EZP Maintenance Mode
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,800 ▲4615.86 ▲0.086.88 ▲0.323.13 ▲0.66
Dashboard /wp-admin2,897 ▲366.06 ▼0.15116.24 ▼19.16157.71 ▼5.50
Posts /wp-admin/edit.php2,693 ▲53.24 ▲0.0267.44 ▲4.74142.51 ▲2.97
Add New Post /wp-admin/post-new.php1,714 ▼3820.84 ▼0.79431.45 ▼22.47162.80 ▲7.01
Media Library /wp-admin/upload.php1,706 ▲85.56 ▲0.11139.63 ▼0.02189.33 ▲3.76
Maintenance Mode /wp-admin/options-general.php?page=easy-pie-maintenance-mode2,0504.8385.43172.71

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
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=easy-pie-maintenance-mode
    • > User deprecated in wp-includes/functions.php+5326
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=easy-pie-maintenance-mode
    • > User deprecated in wp-includes/functions.php+5326
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/easy-pie-maintenance-mode/classes/class-easy-pie-utility.php:50
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/easy-pie-maintenance-mode/classes/class-easy-pie-mm-utility.php on line 48
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/easy-pie-maintenance-mode/classes/class-easy-pie-mm-utility.php on line 48
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/easy-pie-maintenance-mode/classes/class-easy-pie-mm-utility.php on line 48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/easy-pie-maintenance-mode/classes/class-easy-pie-mm-utility.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/easy-pie-maintenance-mode/classes/class-easy-pie-mm-utility.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/easy-pie-maintenance-mode/classes/class-easy-pie-mm-utility.php:50

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
  • Screenshots: Please add images for these screenshots: #3 (Site in maintenance mode when using the 'Plain Jane' mini-theme.), #4 (Site in maintenance mode when using the 'Black Sawhorse' mini-theme.)
You can take inspiration from this readme.txt

easy-pie-maintenance-mode/easy-pie-maintenance-mode.php Passed 13 tests

"EZP Maintenance Mode" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
52 characters long description:
Lets people know that your site is temporarily down.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin1,720 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP8293238711
CSS715561575
HTML46924183
JavaScript24633123
JSON40064
PO File1344464

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity10.40
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods50
▷ Static methods1530.00%
▷ Public methods4386.00%
▷ Protected methods00.00%
▷ Private methods714.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
15 PNG files occupy 0.33MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
mini-themes/sawhorse-black/images/pattern.png14.82KB0.95KB▼ 93.61%
mini-themes/sawhorse-yellow/images/logo.png22.53KB8.58KB▼ 61.94%
mini-themes/sawhorse-yellow/images/alert.png15.82KB6.68KB▼ 57.80%
mini-themes/plain/images/screenshot.png6.29KB2.84KB▼ 54.87%
images/easy-pie-mm-logo32.png1.52KB1.46KB▼ 3.99%