70% maintenance-mode-for-woocommerce

Code Review | Maintenance mode for WooCommerce

WordPress plugin Maintenance mode for WooCommerce scored70%from 54 tests.

About plugin

  • Plugin page: maintenance-mode-...
  • Plugin version: 1.0.19
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Apr 23, 2020
  • Latest release: Nov 8, 2023
  • Number of updates: 55
  • Update frequency: every 23.6 days
  • Top authors: netfett (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /16,130 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼3.33ms] Passed 4 tests

A check of server-side resources used by Maintenance mode for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0839.85 ▲5.26
Dashboard /wp-admin3.40 ▲0.0946.04 ▲1.03
Posts /wp-admin/edit.php3.51 ▲0.1544.65 ▲2.58
Add New Post /wp-admin/post-new.php5.98 ▲0.0983.67 ▼15.67
Media Library /wp-admin/upload.php3.32 ▲0.0934.21 ▼1.27

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Maintenance mode for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4214.25 ▼0.021.81 ▲0.0742.20 ▲1.24
Dashboard /wp-admin2,206 ▲295.55 ▼0.1093.54 ▼6.9941.05 ▼5.74
Posts /wp-admin/edit.php2,115 ▲122.02 ▲0.0534.64 ▼7.5537.25 ▲5.58
Add New Post /wp-admin/post-new.php1,535 ▲923.12 ▼0.13691.56 ▲2.1950.09 ▲1.22
Media Library /wp-admin/upload.php1,417 ▲174.18 ▼0.0399.29 ▲5.8941.70 ▼0.44

Uninstaller [IO: ▲0.06MB] [DB: ▲0.00MB] 25% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function check_admin_referer was called incorrectly. You should specify an action to be verified by using the first parameter. Please see Debugging in WordPress for more information. (This message was added in version 3.2.0.)
  • This plugin has failed uninstalling correctly, leaving 25 files (0.06MB) in the plugin directory
    • (new file) includes/index.php
    • (new file) includes/class-nf-maintenance-loader.php
    • (new file) admin/index.php
    • (new file) includes/class-nf-maintenance.php
    • (new file) includes/class-nf-maintenance-deactivator.php
    • (new file) admin/js/nf-maintenance-admin.js
    • (new file) includes/class-nf-maintenance-activator.php
    • (new file) admin/class-nf-maintenance-admin.php
    • (new file) includes/class-nf-maintenance-i18n.php
    • (new file) admin/css/nf-maintenance-admin.css
    • ...
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • nf_maintenance_cfg
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
10 plugin tags: woocommerce maintenance, under construction, coming soon, woocommerce, private...

maintenance-mode-for-woocommerce/maintenance-mode-for-woocommerce.php Passed 13 tests

The main file in "Maintenance mode for WooCommerce" v. 1.0.19 serves as a complement to information provided in readme.txt and as the entry point to the plugin
80 characters long description:
Put WooCommerce in maintenance mode, without affecting other parts of a website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected758 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP1020923452
PO File36063247
CSS210056
JavaScript12273

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity6.57
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity2.05
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods37
▷ Static methods25.41%
▷ Public methods3286.49%
▷ Protected methods00.00%
▷ Private methods513.51%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin