84% kul-maintenance

Code Review | Kul Maintenance

WordPress plugin Kul Maintenance scored84%from 54 tests.

About plugin

  • Plugin page: kul-maintenance
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-5.4.1
  • WordPress version: 6.3.1
  • First release: Sep 23, 2015
  • Latest release: Jul 16, 2020
  • Number of updates: 16
  • Update frequency: every 109.9 days
  • Top authors: kulchan (62.5%)anstrangel0ver (43.75%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /8,071 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.17MB] [CPU: ▼4.31ms] Passed 4 tests

A check of server-side resources used by Kul Maintenance
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1337.03 ▼4.32
Dashboard /wp-admin3.48 ▲0.1848.95 ▼4.63
Posts /wp-admin/edit.php3.60 ▲0.2454.49 ▲2.89
Add New Post /wp-admin/post-new.php6.06 ▲0.1893.97 ▼11.17
Media Library /wp-admin/upload.php3.41 ▲0.1838.61 ▲3.77

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 40 new files
Database: no new tables, 8 new options
New WordPress options
kul_maintenance_slider_status
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
kul_maintenance_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Kul Maintenance
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.23 ▼0.051.81 ▲0.0743.19 ▼1.37
Dashboard /wp-admin2,210 ▲335.51 ▼0.1085.79 ▼2.9965.93 ▲25.65
Posts /wp-admin/edit.php2,115 ▲152.01 ▲0.0242.45 ▲4.2238.93 ▲1.81
Add New Post /wp-admin/post-new.php1,554 ▲2623.02 ▼0.05657.42 ▼36.9760.96 ▼6.15
Media Library /wp-admin/upload.php1,409 ▲94.21 ▼0.02102.25 ▲7.3268.94 ▲25.65

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • kul_maintenance_slider_status
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • kul_maintenance_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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 take a closer look at the following
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/kul-maintenance/view/maintenance.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/kul-maintenance/install.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kul-maintenance/view/functions.php:45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kul-maintenance/require/functions.php:321
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kul-maintenance/require/admin.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: administration, vvisual editor, maintenance mode, coming soon, maintenance page...

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

The main file in "Kul Maintenance" v. 1.4.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
93 characters long description:
Used for Maintenance mode with slider and contact form while updating or used as coming soon.

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
There were no executable files found in this plugin14,356 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
CSS62,152418,977
JavaScript121,0171,0192,860
PHP7220381,293
SVG1001,226

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.64
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions47
▷ Named functions47100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
view/images/body_overlay_bg.png0.91KB0.09KB▼ 89.60%
images/kul-icon.png0.90KB0.85KB▼ 5.63%
view/images/logo.png5.76KB1.48KB▼ 74.39%
images/kul-logo.png15.32KB6.30KB▼ 58.88%