83% colorlib-coming-soon-maintenance

Code Review | Coming Soon & Maintenance Mode by Colorlib

WordPress plugin Coming Soon & Maintenance Mode by Colorlib scored83%from 54 tests.

About plugin

  • Plugin page: colorlib-coming-s...
  • Plugin version: 1.0.99
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 6, 2018
  • Latest release: May 27, 2022
  • Number of updates: 37
  • Update frequency: every 34.3 days
  • Top authors: machothemes (45.95%)giucu91 (27.03%)silkalns (27.03%)raldea89 (8.11%)

Code review

54 tests

User reviews

38 reviews

Install metrics

8,000+ active /223,382 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.22MB] [CPU: ▼5.68ms] Passed 4 tests

A check of server-side resources used by Coming Soon & Maintenance Mode by Colorlib
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2140.65 ▲0.66
Dashboard /wp-admin3.53 ▲0.2345.00 ▼4.92
Posts /wp-admin/edit.php3.64 ▲0.2946.86 ▲1.11
Add New Post /wp-admin/post-new.php6.11 ▲0.2383.12 ▼16.84
Media Library /wp-admin/upload.php3.45 ▲0.2336.82 ▼1.61

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 137 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
ccsm_settings

Browser metrics Passed 4 tests

An overview of browser requirements for Coming Soon & Maintenance Mode by Colorlib
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7314.63 ▲0.261.76 ▼0.0143.44 ▼1.22
Dashboard /wp-admin2,228 ▲434.86 ▼1.00104.98 ▼2.6437.38 ▼11.59
Posts /wp-admin/edit.php2,108 ▲192.02 ▲0.0542.49 ▲4.8635.24 ▼1.59
Add New Post /wp-admin/post-new.php1,549 ▲923.35 ▲0.05615.54 ▼43.4454.47 ▲6.13
Media Library /wp-admin/upload.php1,407 ▲194.20 ▲0.0397.42 ▼2.6045.34 ▲2.80

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • ccsm_settings
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 17× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/colorlib-coming-soon-maintenance/templates/template_03/template_03.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/colorlib-coming-soon-maintenance/templates/template_08/template_08.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/colorlib-coming-soon-maintenance/templates/template_10/template_10.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/colorlib-coming-soon-maintenance/templates/template_02/template_02.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/colorlib-coming-soon-maintenance/templates/template_04/template_04.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/colorlib-coming-soon-maintenance/templates/template_01/template_01.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/colorlib-coming-soon-maintenance/includes/class-ccsm-customizer.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/colorlib-coming-soon-maintenance/templates/template_07/template_07.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/colorlib-coming-soon-maintenance/templates/template_11/template_11.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/colorlib-coming-soon-maintenance/templates/template_12/template_12.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Screenshots are located under /assets/screenshots/) image missing
  • Contributors: Contributors not specified
Please take inspiration from this readme.txt

colorlib-coming-soon-maintenance/colorlib-coming-soon-and-maintenance-mode.php 85% from 13 tests

The principal PHP file in "Coming Soon & Maintenance Mode by Colorlib" v. 1.0.99 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 248 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("colorlib-coming-soon-maintenance.php" instead of "colorlib-coming-soon-and-maintenance-mode.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
Everything looks great! No dangerous files found in this plugin42,424 lines of code in 82 files:
LanguageFilesBlank linesComment linesLines of code
CSS314,2611,46925,128
JavaScript243,2852,82811,042
PHP254962803,810
SVG1032,227
PO File189177217

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity3.71
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity1.70
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2385.19%
▷ Protected methods00.00%
▷ Private methods414.81%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/favicon.png0.10KB0.08KB▼ 17.65%