84% lb-maintenance-mode

Code Review | LB Maintenance Mode

WordPress plugin LB Maintenance Mode scored84%from 54 tests.

About plugin

  • Plugin page: lb-maintenance-mode
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.3.21+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7.2-5.8.0
  • WordPress version: 6.3.1
  • First release: Jul 9, 2021
  • Latest release: Jul 20, 2021
  • Number of updates: 3
  • Update frequency: every 4.0 days
  • Top authors: baciotti (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /287 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by LB Maintenance Mode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0143.39 ▲3.55
Dashboard /wp-admin3.32 ▼0.0348.72 ▼13.10
Posts /wp-admin/edit.php3.37 ▲0.0152.84 ▲0.85
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.29 ▼9.10
Media Library /wp-admin/upload.php3.24 ▲0.0141.19 ▲3.10

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by LB Maintenance Mode
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.26 ▼0.271.67 ▼0.1944.00 ▲2.56
Dashboard /wp-admin2,194 ▲205.59 ▼0.0685.54 ▼11.0038.49 ▼1.79
Posts /wp-admin/edit.php2,102 ▲22.16 ▲0.1734.56 ▼4.5634.90 ▲0.71
Add New Post /wp-admin/post-new.php1,530 ▼123.04 ▲0.05647.66 ▼60.2656.89 ▲0.45
Media Library /wp-admin/upload.php1,399 ▼14.22 ▼0.01101.78 ▼15.6645.88 ▼1.87

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

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
Good news, no errors were detected

SRP 50% from 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lb-maintenance-mode/includes/lb_maintenance_mode_settings.php:56
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lb-maintenance-mode/includes/lb_maintenance_mode_scripts.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: dashboard, maintenance

lb-maintenance-mode/lb_maintenance_mode.php 92% from 13 tests

Analyzing the main PHP file in "LB Maintenance Mode" version 1.0.0
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("lb-maintenance-mode.php" instead of "lb_maintenance_mode.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin61 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3123061

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin