79% simple-wp-maintenance

Code Review | Simple WP Maintenance

WordPress plugin Simple WP Maintenance scored79%from 54 tests.

About plugin

  • Plugin page: simple-wp-mainten...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Mar 29, 2023
  • Latest release: Nov 16, 2023
  • Number of updates: 5
  • Update frequency: every 46.4 days
  • Top authors: dreiebenen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /381 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.14MB] [CPU: ▼20.59ms] Passed 4 tests

Server-side resources used by Simple WP Maintenance
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.45 ▼0.0229.09 ▼10.66
Dashboard /wp-admin3.25 ▼0.1031.66 ▼30.18
Posts /wp-admin/edit.php3.31 ▼0.0435.24 ▼11.56
Add New Post /wp-admin/post-new.php5.50 ▼0.3973.93 ▼29.95
Media Library /wp-admin/upload.php3.26 ▲0.0331.92 ▼1.97
Simple WP Maintenance /wp-admin/options-general.php?page=simple-wp-maintenance3.2530.17

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Simple WP Maintenance
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3214.67 ▲0.301.79 ▲0.0437.09 ▼7.09
Dashboard /wp-admin2,202 ▲245.59 ▲0.0184.84 ▼24.9643.83 ▼2.32
Posts /wp-admin/edit.php2,101 ▲12.01 ▲0.0240.42 ▲1.1640.96 ▲0.62
Add New Post /wp-admin/post-new.php1,529 ▲323.38 ▼0.09691.58 ▲68.9953.27 ▼2.80
Media Library /wp-admin/upload.php1,404 ▲44.20 ▲0.0398.20 ▼2.7441.95 ▼0.75
Simple WP Maintenance /wp-admin/options-general.php?page=simple-wp-maintenance1,3013.7968.7828.70

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple-wp-maintenance
    • > Notice in wp-content/plugins/simple-wp-maintenance/simple-wp-maintenance.php+158
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-wp-maintenance/simple-wp-maintenance.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: under construction, maintenance mode, maintenance, coming soon, website offline

simple-wp-maintenance/simple-wp-maintenance.php Passed 13 tests

The primary PHP file in "Simple WP Maintenance" version 1.1 is used by WordPress to initiate all plugin functionality
98 characters long description:
Sets the WordPress website to maintenance mode and displays a custom message and background image.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected499 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP16320250
PO File46668212
JavaScript361037

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin