83% maintenance-coming-soon-redirect-animation

Code Review | Maintenance & Coming Soon Redirect Animation

WordPress plugin Maintenance & Coming Soon Redirect Animation scored83%from 54 tests.

About plugin

  • Plugin page: maintenance-comin...
  • Plugin version: 2.1.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Aug 14, 2022
  • Latest release: May 20, 2023
  • Number of updates: 15
  • Update frequency: every 19.3 days
  • Top authors: yasinedr (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

60+ active /1,137 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.42MB] [CPU: ▼1.47ms] Passed 4 tests

An overview of server-side resources used by Maintenance & Coming Soon Redirect Animation
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4148.36 ▲3.86
Dashboard /wp-admin3.73 ▲0.4255.75 ▼3.00
Posts /wp-admin/edit.php3.84 ▲0.4853.12 ▲3.37
Add New Post /wp-admin/post-new.php6.32 ▲0.4389.23 ▼10.12
Media Library /wp-admin/upload.php3.65 ▲0.4244.58 ▲9.46
All settings /wp-admin/admin.php?page=wploti-settings3.6845.20
Maintenance /wp-admin/options-general.php?page=wploti-settings3.6848.76

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 56 new files
Database: 2 new tables, 14 new options
New tables
wp_wploti_mr_unrestricted_ips
wp_wploti_mr_access_keys
New WordPress options
widget_theysaidso_widget
wploti_status
wploti_animation
widget_recent-comments
wploti_whitelisted_roles
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
wploti_activation_notice
db_upgraded
...

Browser metrics Passed 4 tests

A check of browser resources used by Maintenance & Coming Soon Redirect Animation
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,550 ▲78920.30 ▲5.9425.21 ▲23.0546.71 ▼0.47
Dashboard /wp-admin2,856 ▲67911.61 ▲5.92143.12 ▲41.3369.57 ▲20.21
Posts /wp-admin/edit.php2,770 ▲6708.50 ▲6.49109.21 ▲72.3380.90 ▲45.13
Add New Post /wp-admin/post-new.php1,900 ▲35521.95 ▼1.42635.41 ▼32.0032.05 ▼19.11
Media Library /wp-admin/upload.php2,057 ▲6549.82 ▲5.52166.77 ▲69.8660.34 ▲16.15
Access Keys /wp-admin/admin.php?page=wploti-settings#keys6,90265.131,098.5794.06
Animation /wp-admin/admin.php?page=wploti-settings#animation7,01069.461,142.21145.56
Extra /wp-admin/admin.php?page=wploti-settings#extra6,99567.041,065.23138.60
All settings /wp-admin/admin.php?page=wploti-settings6,90464.951,059.54145.92
Maintenance /wp-admin/options-general.php?page=wploti-settings6,95567.011,078.3276.18
Header Type /wp-admin/admin.php?page=wploti-settings#header7,40671.721,081.73119.85
IP addresses /wp-admin/admin.php?page=wploti-settings#ip7,01370.541,107.80136.75
Message /wp-admin/admin.php?page=wploti-settings#message6,90566.111,160.51135.71

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • wploti_whitelisted_users
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • wploti_whitelisted_roles

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 Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wploti-settings#message
    • > Console-api (warning) in wp-admin/admin.php?page=wploti-settings+0:16
    %c Best used for when the site is under development." "margin: 20px auto;font-family: cursive;font-size: 30px; font-weight: bold;color: #CFC547; text-align: center;letter-spacing: 5px;text-shadow: 3px 0px 2px rgba(81,67,21,0.8), -3px 0px 2px rgba(81,67,21,0.8),0px 4px 2px rgba(81,67,21,0.8);
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wploti-settings#message
    • > Console-api (warning) in unknown
    console-api 0:8 "%c Best used for when the site is under development." "margin: 20px auto;font-family: cursive;font-size: 30px; font-weight: bold;color: #CFC547; text-align: center;letter-spacing: 5px;text-shadow: 3px 0px 2px rgba(81,67,21,0.8), -3px 0px 2px rgba(81,67,21,0.8),0px 4px 2px rgba(81,67,21,0.8);"

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
The official readme.txt is a good inspiration

maintenance-coming-soon-redirect-animation/wploti_maintenance_redirect.php 85% from 13 tests

"Maintenance & Coming Soon Redirect Animation" version 2.1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 157 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("maintenance-coming-soon-redirect-animation.php" instead of "wploti_maintenance_redirect.php")

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
No dangerous file extensions were detected12,649 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
SVG1009,519
PHP35575641,580
CSS414225903
JavaScript3106152375
PO File18183242
JSON300030

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity106.00
▷ Minimum class complexity106.00
▷ Maximum class complexity106.00
Average method complexity2.84
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods57
▷ Static methods00.00%
▷ Public methods57100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 compressed PNG files occupy 0.03MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/main-logo.png6.40KB6.84KB0.00%
images/alert-icon.png27.76KB28.83KB0.00%