84% wp-secure-maintainance

Code Review | WP Secure Maintenance

WordPress plugin WP Secure Maintenance scored84%from 54 tests.

About plugin

  • Plugin page: wp-secure-maintai...
  • Plugin version: 1.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0
  • WordPress version: 6.3.1
  • First release: Mar 2, 2016
  • Latest release: May 24, 2022
  • Number of updates: 50
  • Update frequency: every 45.6 days
  • Top authors: wooexpert (76%)wpexpertsio (26%)

Code review

54 tests

User reviews

5 reviews

Install metrics

2,000+ active /43,102 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
This plugin's installer ran successfully

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

A check of server-side resources used by WP Secure Maintenance
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.51 ▼2.90
Dashboard /wp-admin3.40 ▲0.1049.28 ▼1.24
Posts /wp-admin/edit.php3.52 ▲0.1749.58 ▼0.60
Add New Post /wp-admin/post-new.php5.98 ▲0.0994.47 ▲5.41
Media Library /wp-admin/upload.php3.29 ▲0.0737.39 ▲4.46

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Secure Maintenance
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,985 ▲25014.70 ▲0.291.93 ▲0.1743.44 ▼2.42
Dashboard /wp-admin2,354 ▲1696.46 ▲0.54122.16 ▲1.1677.37 ▲30.78
Posts /wp-admin/edit.php2,280 ▲1913.44 ▲1.4649.98 ▲12.2534.09 ▼4.65
Add New Post /wp-admin/post-new.php1,535 ▲222.96 ▼0.12581.91 ▼104.8047.47 ▼11.53
Media Library /wp-admin/upload.php1,410 ▲254.12 ▼0.1379.97 ▼20.6844.91 ▲1.81

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-secure-maintainance/wp_secure_maintainance.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-secure-maintainance/inc/wpsp_functions.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_settings_sections() in wp-content/plugins/wp-secure-maintainance/inc/wpsp_options.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% 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
4 plugin tags: maintenance, development, site security, maintenance lock

wp-secure-maintainance/wp_secure_maintainance.php 85% from 13 tests

The principal PHP file in "WP Secure Maintenance" v. 1.6 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.0" instead of "5.2")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-secure-maintainance.php" instead of "wp_secure_maintainance.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected524 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP35023278
CSS1153181
JavaScript114465

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1694.12%
▷ Protected methods00.00%
▷ Private methods15.88%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/default-logo.png6.29KB2.90KB▼ 53.89%
img/icon.png2.08KB1.30KB▼ 37.39%