84% tkt-maintenance

Code Review | TukuToi Maintenance

WordPress plugin TukuToi Maintenance scored84%from 54 tests.

About plugin

  • Plugin page: tkt-maintenance
  • Plugin version: 2.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.8.1
  • WordPress version: 6.3.1
  • First release: Jun 27, 2021
  • Latest release: Sep 10, 2021
  • Number of updates: 12
  • Update frequency: every 6.3 days
  • Top authors: bedas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /534 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.02ms] Passed 4 tests

This is a short check of server-side resources used by TukuToi Maintenance
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.55 ▼3.83
Dashboard /wp-admin3.34 ▲0.0444.30 ▼2.99
Posts /wp-admin/edit.php3.39 ▲0.0449.31 ▼1.71
Add New Post /wp-admin/post-new.php5.92 ▲0.0490.82 ▼11.56
Media Library /wp-admin/upload.php3.27 ▲0.0434.21 ▲0.99

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

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

Browser metrics Passed 4 tests

Checking browser requirements for TukuToi Maintenance
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.17 ▼0.181.69 ▼0.1045.04 ▲0.24
Dashboard /wp-admin2,192 ▲185.63 ▲0.1091.35 ▲0.9139.48 ▼1.98
Posts /wp-admin/edit.php2,103 ▲31.98 ▼0.0339.10 ▲1.7035.50 ▼0.67
Add New Post /wp-admin/post-new.php1,526 ▼223.28 ▲0.27673.52 ▲8.0251.46 ▼4.21
Media Library /wp-admin/upload.php1,400 ▼34.35 ▲0.1498.30 ▼7.4843.50 ▲1.09

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/tkt-maintenance/public/partials/tkt-maintenance-public-display.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
3 plugin tags: maintenance, coming soon, under development

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

"TukuToi Maintenance" version 2.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
72 characters long description:
Enable and Control a Custom Maintenance Mode for your WordPress Website.

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
Everything looks great! No dangerous files found in this plugin551 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP8220534454
JavaScript2306555
CSS10442

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity7.20
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity1.76
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods41
▷ Static methods00.00%
▷ Public methods3175.61%
▷ Protected methods00.00%
▷ Private methods1024.39%
Functions1
▷ Named functions1100.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
There were not PNG files found in your plugin