89% ultimate-maintenance-mode-for-woocommerce

Code Review | WooCommerce Maintenance Mode | WooCommerce Redirects | WooCommerce Banner Notice

WordPress plugin WooCommerce Maintenance Mode | WooCommerce Redirects | WooCommerce Banner Notice scored 89% from 54 tests.

About plugin

  • Plugin page: ultimate-maintena...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.0-6.2
  • WordPress version: 6.3.1
  • First release: Feb 4, 2021
  • Latest release: Apr 22, 2023
  • Number of updates: 11
  • Update frequency: every 73.5 days
  • Top authors: grandplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 1,436 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by WooCommerce Maintenance Mode | WooCommerce Redirects | WooCommerce Banner Notice
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0044.18 ▼2.99
Dashboard /wp-admin3.31 ▲0.0052.43 ▼3.69
Posts /wp-admin/edit.php3.36 ▲0.0048.84 ▼3.48
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.51 ▼8.09
Media Library /wp-admin/upload.php3.23 ▲0.0037.77 ▼3.47

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Maintenance Mode | WooCommerce Redirects | WooCommerce Banner Notice
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲1113.36 ▲0.161.67 ▼0.1540.36 ▼2.43
Dashboard /wp-admin2,200 ▼65.86 ▼0.02105.72 ▼3.2840.69 ▼0.72
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0339.51 ▼1.1934.20 ▲0.10
Add New Post /wp-admin/post-new.php1,536 ▲18323.32 ▲5.03661.01 ▼76.7972.81 ▲24.89
Media Library /wp-admin/upload.php1,388 ▲34.16 ▼0.0396.16 ▼13.2443.23 ▼4.54

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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

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 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed: The official readme.txt might help

ultimate-maintenance-mode-for-woocommerce/gpls-woo-shop-maintenance.php 92% from 13 tests

The main PHP script in "WooCommerce Maintenance Mode | WooCommerce Redirects | WooCommerce Banner Notice" version 1.0.1 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ultimate-maintenance-mode-for-woocommerce.php" instead of "gpls-woo-shop-maintenance.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,990 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP143638391,977
JavaScript70168
CSS50125

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.46
Average class complexity39.25
▷ Minimum class complexity1.00
▷ Maximum class complexity116.00
Average method complexity3.83
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces4
Interfaces0
Traits1
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods109
▷ Static methods1110.09%
▷ Public methods9889.91%
▷ Protected methods00.00%
▷ Private methods1110.09%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants2
▷ Global constants2100.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
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
core/assets/dist/images/logo-icon-sm.png0.62KB0.72KB0.00%
core/assets/dist/images/logo-icon-lg.png3.56KB2.72KB▼ 23.62%
core/assets/dist/images/logo-icon-md.png0.91KB0.96KB0.00%
core/assets/dist/images/full-logo.png6.58KB3.86KB▼ 41.28%