72% wpsimple-maintenance

Code Review | WP Simple Maintenance

WordPress plugin WP Simple Maintenance scored 72% from 54 tests.

About plugin

  • Plugin page: wpsimple-maintenance
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.7.2
  • WordPress version: 6.3.1
  • First release: Feb 11, 2017
  • Latest release: Feb 11, 2017
  • Number of updates: 14
  • Update frequency: every 2.4 days
  • Top authors: mamunitiw (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,043 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.12MB] [CPU: ▼8.38ms] Passed 4 tests

A check of server-side resources used by WP Simple Maintenance
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▼0.6217.25 ▼24.25
Dashboard /wp-admin3.35 ▲0.0448.83 ▼3.67
Posts /wp-admin/edit.php3.40 ▲0.0443.20 ▼5.65
Add New Post /wp-admin/post-new.php5.93 ▲0.0493.64 ▲0.05
Media Library /wp-admin/upload.php3.27 ▲0.0434.38 ▲0.20
WP Simple Maintenance /wp-admin/options-general.php?page=wpsm_options3.2727.09

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WP Simple Maintenance
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲16415.37 ▲1.0016.67 ▲14.6235.90 ▼8.54
Dashboard /wp-admin2,210 ▲224.89 ▼0.00113.43 ▼2.3142.46 ▼3.94
Posts /wp-admin/edit.php2,093 ▲41.98 ▼0.0735.82 ▲0.5232.22 ▼2.78
Add New Post /wp-admin/post-new.php1,541 ▲2723.02 ▲5.45640.56 ▼34.3071.43 ▲17.27
Media Library /wp-admin/upload.php1,389 ▲14.21 ▼0.0097.63 ▲1.6442.34 ▲1.01
WP Simple Maintenance /wp-admin/options-general.php?page=wpsm_options9042.2335.3829.99

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wpsm_options
    • > Notice in wp-content/plugins/wpsimple-maintenance/admin/wp-maintenance-admin.php+276
    Undefined index: wpsm-active-status
    • > GET request to /wp-admin/options-general.php?page=wpsm_options
    • > Notice in wp-content/plugins/wpsimple-maintenance/admin/wp-maintenance-admin.php+401
    Undefined index: wpsm-page-title
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpsm_options
    • > Notice in wp-content/plugins/wpsimple-maintenance/admin/wp-maintenance-admin.php+291
    Undefined index: wpsm-user-roles
    • > GET request to /wp-admin/options-general.php?page=wpsm_options
    • > Notice in wp-content/plugins/wpsimple-maintenance/admin/wp-maintenance-admin.php+303
    Undefined index: wpsm-exclude-page
    • > GET request to /wp-admin/options-general.php?page=wpsm_options
    • > Notice in wp-content/plugins/wpsimple-maintenance/admin/wp-maintenance-admin.php+314
    Undefined index: wpsm-google-analytics

SRP 0% 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wpsimple-maintenance/wp-maintenance.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wpsimple-maintenance/templates/template-1.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/wpsimple-maintenance/admin/admin-settings.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Donate link: Invalid url: ""
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can take inspiration from this readme.txt

wpsimple-maintenance/wp-maintenance.php 92% from 13 tests

The principal PHP file in "WP Simple Maintenance" v. 1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wpsimple-maintenance.php" instead of "wp-maintenance.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin11,848 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
CSS6114487,469
JavaScript62782712,692
SVG200928
PHP6169198759

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity18.00
▷ Minimum class complexity14.00
▷ Maximum class complexity22.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods41
▷ Static methods00.00%
▷ Public methods41100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin