78% cmp-coming-soon-maintenance

Code Review | CMP - Coming Soon & Maintenance Plugin by NiteoThemes

WordPress plugin CMP - Coming Soon & Maintenance Plugin by NiteoThemes scored78%from 54 tests.

About plugin

  • Plugin page: cmp-coming-soon-m...
  • Plugin version: 4.1.10
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 13, 2017
  • Latest release: Aug 28, 2023
  • Number of updates: 329
  • Update frequency: every 7.1 days
  • Top authors: niteo (100%)

Code review

54 tests

User reviews

299 reviews

Install metrics

200,000+ active /4,586,787 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.60MB] [CPU: ▼0.86ms] Passed 4 tests

Analyzing server-side resources used by CMP - Coming Soon & Maintenance Plugin by NiteoThemes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.09 ▲0.6347.37 ▲4.28
Dashboard /wp-admin3.94 ▲0.6055.72 ▼9.29
Posts /wp-admin/edit.php3.99 ▲0.6453.75 ▲3.57
Add New Post /wp-admin/post-new.php6.48 ▲0.6096.59 ▼1.98
Media Library /wp-admin/upload.php3.80 ▲0.5851.56 ▲15.44
Upload CMP Theme /wp-admin/admin.php?page=cmp-upload-theme3.7941.42
CMP Basic Setup /wp-admin/admin.php?page=cmp-settings4.3180.86
CMP Translation /wp-admin/admin.php?page=cmp-translate3.8240.98
CMP Subscribers /wp-admin/admin.php?page=cmp-subscribers3.8238.63
CMP Advanced Setup /wp-admin/admin.php?page=cmp-advanced4.0649.90

Server storage [IO: ▲15.52MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Please try to fix the following items
  • The plugin illegally modified 2 files (4.00KB) outside of "wp-content/plugins/cmp-coming-soon-maintenance/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/cmp-coming-soon-maintenance/img/thumbnails/nova_thumbnail.jpg\357\200\272Zone.Identifier"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 580 new files
Database: no new tables, 9 new options
New WordPress options
niteoCS_translation
widget_theysaidso_widget
niteoCS_version
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
niteoCS_slider

Browser metrics Passed 4 tests

CMP - Coming Soon & Maintenance Plugin by NiteoThemes: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,030 ▲26913.60 ▼1.075.98 ▲4.2642.69 ▲1.35
Dashboard /wp-admin2,282 ▲825.85 ▼0.0398.09 ▼30.8181.82 ▲20.09
Posts /wp-admin/edit.php2,179 ▲762.00 ▼0.0436.79 ▼5.7034.66 ▲0.46
Add New Post /wp-admin/post-new.php1,760 ▲22024.47 ▲1.08718.34 ▲24.1249.63 ▼15.35
Media Library /wp-admin/upload.php1,476 ▲794.22 ▲0.02110.82 ▲11.3784.12 ▲36.52
Upload CMP Theme /wp-admin/admin.php?page=cmp-upload-theme1,0242.0828.7537.98
CMP Basic Setup /wp-admin/admin.php?page=cmp-settings7,54210.17382.09243.14
CMP Translation /wp-admin/admin.php?page=cmp-translate1,2162.0326.0733.99
CMP Subscribers /wp-admin/admin.php?page=cmp-subscribers1,1561.6824.6426.36
CMP Advanced Setup /wp-admin/admin.php?page=cmp-advanced2,2852.1853.6539.73

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

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 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
Please fix the following
  • 44× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/cmp-coming-soon-maintenance/cmp-settings.php
    • > /wp-content/plugins/cmp-coming-soon-maintenance/cmp-translate.php
    • > /wp-content/plugins/cmp-coming-soon-maintenance/inc/settings/settings-special_effects-disabled.php
    • > /wp-content/plugins/cmp-coming-soon-maintenance/themes/countdown/countdown-social_settings.php
    • > /wp-content/plugins/cmp-coming-soon-maintenance/inc/settings/settings-lang-switcher-disabled.php
    • > /wp-content/plugins/cmp-coming-soon-maintenance/inc/settings/settings-progress-bar.php
    • > /wp-content/plugins/cmp-coming-soon-maintenance/inc/settings/settings-contact_form-disabled.php
    • > /wp-content/plugins/cmp-coming-soon-maintenance/inc/class-cmp-render_html.php
    • > /wp-content/plugins/cmp-coming-soon-maintenance/inc/settings/settings-seo.php
    • > /wp-content/plugins/cmp-coming-soon-maintenance/themes/hardwork/hardwork-defaults.php
  • 41× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: liclass in wp-content/plugins/cmp-coming-soon-maintenance/inc/render/social-icons.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/cmp-coming-soon-maintenance/themes/hardwork/hardwork-theme.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cmp-coming-soon-maintenance/inc/render/graphic-slider.php:9
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cmp-coming-soon-maintenance/inc/render/content.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cmp-coming-soon-maintenance/inc/render/fonts.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/cmp-coming-soon-maintenance/inc/settings/settings-footer-disabled.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cmp-coming-soon-maintenance/inc/render/graphic-background.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cmp-coming-soon-maintenance/inc/webfonts.php:3
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/cmp-coming-soon-maintenance/inc/render/custom-css.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cmp-coming-soon-maintenance/inc/render/graphic-overlay.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: coming soon, launch page, under construction, coming soon page, maintenance mode

cmp-coming-soon-maintenance/niteo-cmp.php 92% from 13 tests

"CMP - Coming Soon & Maintenance Plugin by NiteoThemes" version 4.1.10's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("cmp-coming-soon-maintenance.php" instead of "niteo-cmp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected29,630 lines of code in 384 files:
LanguageFilesBlank linesComment linesLines of code
SVG2790129,723
PHP772,5001,4549,286
CSS112,082767,653
JavaScript162761511,773
PO File15075961,195

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity88.50
▷ Minimum class complexity2.00
▷ Maximum class complexity432.00
Average method complexity4.43
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods153
▷ Static methods10.65%
▷ Public methods14997.39%
▷ Protected methods00.00%
▷ Private methods42.61%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants17100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
15 PNG files occupy 0.67MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/patterns/photography.png0.98KB1.07KB0.00%
img/patterns/gray_sand.png16.58KB19.53KB0.00%
img/patterns/playstation.png21.69KB3.89KB▼ 82.06%
img/patterns/noisy.png20.89KB22.76KB0.00%
img/patterns/green_dust_scratch.png42.62KB47.33KB0.00%