89% woocommerce-maintenance-mode

Code Review | WooCommerce Maintenance Mode (Free)

WordPress plugin WooCommerce Maintenance Mode (Free) scored89%from 54 tests.

About plugin

  • Plugin page: woocommerce-maint...
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.9.1
  • WordPress version: 6.3.1
  • First release: Jun 10, 2014
  • Latest release: Dec 30, 2017
  • Number of updates: 36
  • Update frequency: every 36.1 days
  • Top authors: themattroyal (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

600+ active /16,128 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
Install script ran successfully

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

Analyzing server-side resources used by WooCommerce Maintenance Mode (Free)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.59 ▼5.49
Dashboard /wp-admin3.31 ▲0.0043.30 ▼10.67
Posts /wp-admin/edit.php3.36 ▲0.0047.83 ▼1.45
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.42 ▼20.06
Media Library /wp-admin/upload.php3.23 ▲0.0033.39 ▲1.01

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Maintenance Mode (Free)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.59 ▼0.714.07 ▲2.2038.56 ▼6.63
Dashboard /wp-admin2,209 ▲215.02 ▲0.12106.48 ▼11.0636.30 ▼7.11
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.0138.89 ▲0.7435.41 ▲1.73
Add New Post /wp-admin/post-new.php1,514 ▼2017.58 ▼5.47683.33 ▲26.1855.83 ▼7.21
Media Library /wp-admin/upload.php1,388 ▲34.22 ▲0.0596.72 ▼5.1240.30 ▼1.98

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
These items require your attention
  • The uninstall procedure has failed, leaving 8 options in the database
    • can_compress_scripts
    • woo_maint_display_scope
    • widget_theysaidso_widget
    • widget_recent-posts
    • woo_maint_display_type
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
Please take inspiration from this readme.txt

woocommerce-maintenance-mode/woocommerce-maintenance-mode.php 92% from 13 tests

The main PHP script in "WooCommerce Maintenance Mode (Free)" version 2.0.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 479 characters long)

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
Everything looks great! No dangerous files found in this plugin4,062 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
CSS317212,402
PHP9285416777
SVG100685
JavaScript84117184
JSON10014

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity21.50
▷ Minimum class complexity6.00
▷ Maximum class complexity69.00
Average method complexity3.62
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods47
▷ Static methods24.26%
▷ Public methods4595.74%
▷ Protected methods00.00%
▷ Private methods24.26%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.40MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/date_deactivation.png47.97KB15.84KB▼ 66.97%
assets/img/popup.png65.82KB22.42KB▼ 65.94%
assets/img/use_shortcodes.png120.47KB37.24KB▼ 69.09%
assets/img/cookies.png27.76KB9.82KB▼ 64.62%
assets/img/shortcodes.png78.73KB26.20KB▼ 66.73%