84% simple-maintenance

Code Review | Simple Maintenance

WordPress plugin Simple Maintenance scored84%from 54 tests.

About plugin

  • Plugin page: simple-maintenance
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 25, 2014
  • Latest release: Aug 23, 2023
  • Number of updates: 19
  • Update frequency: every 176.3 days
  • Top authors: naa986 (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

1,000+ active /43,322 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.57ms] Passed 4 tests

This is a short check of server-side resources used by Simple Maintenance
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.39 ▼9.52
Dashboard /wp-admin3.32 ▲0.0146.47 ▼5.23
Posts /wp-admin/edit.php3.37 ▲0.0152.48 ▲1.45
Add New Post /wp-admin/post-new.php5.90 ▲0.0197.56 ▲3.02
Media Library /wp-admin/upload.php3.24 ▲0.0136.08 ▲3.42

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Simple Maintenance: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.40 ▼0.151.84 ▼0.2840.26 ▼1.71
Dashboard /wp-admin2,198 ▲185.57 ▼0.0894.09 ▼5.0544.97 ▲0.63
Posts /wp-admin/edit.php2,103 ▼01.95 ▼0.0642.01 ▲5.1238.62 ▼2.19
Add New Post /wp-admin/post-new.php1,526 ▼523.52 ▲0.36610.76 ▼4.4653.50 ▼4.88
Media Library /wp-admin/upload.php1,403 ▲34.20 ▲0.0494.52 ▼8.9642.77 ▼2.62

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/simple-maintenance/sm-template.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: coming soon page, maintenance mode, under construction, maintenance, coming soon

simple-maintenance/main.php 92% from 13 tests

The main file in "Simple Maintenance" v. 1.0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("simple-maintenance.php" instead of "main.php")

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
Everything looks great! No dangerous files found in this plugin95 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP211286
CSS1009

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.62
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
There were not PNG files found in your plugin