84% loft-maintenance

Code Review | Loft Maintenance

WordPress plugin Loft Maintenance scored84%from 54 tests.

About plugin

  • Plugin page: loft-maintenance
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.5
  • WordPress version: 6.3.1
  • First release: Feb 26, 2016
  • Latest release: Apr 28, 2016
  • Number of updates: 12
  • Update frequency: every 5.2 days
  • Top authors: loftocean (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,356 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: ▼4.30ms] Passed 4 tests

Server-side resources used by Loft Maintenance
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.55 ▲5.29
Dashboard /wp-admin3.32 ▼0.0245.98 ▼13.53
Posts /wp-admin/edit.php3.37 ▲0.0249.40 ▲3.53
Add New Post /wp-admin/post-new.php5.90 ▲0.0291.61 ▼10.66
Media Library /wp-admin/upload.php3.25 ▲0.0236.80 ▲3.48
Loft Maintenance /wp-admin/options-general.php?page=loft-maintenance-settings3.2234.30

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Loft Maintenance
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.86 ▲0.271.75 ▲0.0141.18 ▼0.20
Dashboard /wp-admin2,210 ▲244.85 ▼1.05110.82 ▲3.3042.05 ▼0.05
Posts /wp-admin/edit.php2,093 ▲71.97 ▼0.0740.31 ▲3.3334.88 ▼1.12
Add New Post /wp-admin/post-new.php1,545 ▲1718.72 ▲0.28612.17 ▼20.6455.75 ▲3.71
Media Library /wp-admin/upload.php1,386 ▲14.19 ▼0.0594.40 ▼7.6343.31 ▼1.30
Loft Maintenance /wp-admin/options-general.php?page=loft-maintenance-settings8182.0624.2825.26

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • loft_maintenance_plugin_version
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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
Please fix the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/loft-maintenance/class-loft-maintenance-settings.php
    • > /wp-content/plugins/loft-maintenance/loft-maintenance.php
    • > /wp-content/plugins/loft-maintenance/class-loft-maintenance-front.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Donate link: Invalid url: ""
Please take inspiration from this readme.txt

loft-maintenance/loft-maintenance.php Passed 13 tests

This is the main PHP file of "Loft Maintenance" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
83 characters long description:
A toolkit to help you lock down your site when your site is not ready to go public.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected176 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP312117176

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity9.33
▷ Minimum class complexity3.00
▷ Maximum class complexity13.00
Average method complexity2.32
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods1473.68%
▷ Protected methods00.00%
▷ Private methods526.32%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.07MB with 0.06MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png75.39KB18.88KB▼ 74.96%