84% under-construction-page

Code Review | Under Construction

WordPress plugin Under Construction scored84%from 54 tests.

About plugin

  • Plugin page: under-constructio...
  • Plugin version: 3.97
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Dec 1, 2013
  • Latest release: Aug 10, 2023
  • Number of updates: 272
  • Update frequency: every 13.0 days
  • Top authors: WebFactory (97.79%)nitinmaurya12 (2.57%)

Code review

54 tests

User reviews

1264 reviews

Install metrics

600,000+ active /8,932,438 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.64MB] [CPU: ▲0.26ms] Passed 4 tests

Analyzing server-side resources used by Under Construction
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.07 ▲0.6145.11 ▲2.46
Dashboard /wp-admin3.96 ▲0.6554.00 ▲3.30
Posts /wp-admin/edit.php4.04 ▲0.6953.53 ▲2.52
Add New Post /wp-admin/post-new.php6.54 ▲0.6594.15 ▼7.22
Media Library /wp-admin/upload.php3.86 ▲0.6345.65 ▲10.94
UnderConstruction /wp-admin/options-general.php?page=ucp3.9653.64

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 202 new files
Database: no new tables, 8 new options
New WordPress options
ucp_meta
db_upgraded
can_compress_scripts
ucp_pointers
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Under Construction
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲16813.32 ▼0.991.58 ▼0.3240.72 ▼3.93
Dashboard /wp-admin2,276 ▲855.08 ▲0.18108.68 ▼5.4886.88 ▲45.88
Posts /wp-admin/edit.php2,177 ▲882.33 ▲0.3343.04 ▲0.3340.05 ▲3.39
Add New Post /wp-admin/post-new.php1,564 ▲3623.35 ▲5.15695.23 ▲64.3241.94 ▼8.18
Media Library /wp-admin/upload.php1,470 ▲824.37 ▲0.13104.10 ▼0.8683.87 ▲37.71
UnderConstruction /wp-admin/options-general.php?page=ucp7,5778.43241.60280.05

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

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
Good news, no errors were detected

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 fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'UCP' not found in wp-content/plugins/under-construction-page/ucp-license.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 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
10 plugin tags: coming soon, landing page, offline page, launch page, under construction page...

under-construction-page/under-construction.php 92% from 13 tests

The principal PHP file in "Under Construction" v. 3.97 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("under-construction-page.php" instead of "under-construction.php")

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 plugin10,776 lines of code in 86 files:
LanguageFilesBlank linesComment linesLines of code
PHP397463423,993
CSS415852083,699
SVG1002,671
JavaScript511851413

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity99.67
▷ Minimum class complexity12.00
▷ Maximum class complexity274.00
Average method complexity4.86
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods77
▷ Static methods7090.91%
▷ Public methods77100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
82 PNG files occupy 4.69MB with 2.40MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/thumbnails/dark.png32.82KB10.77KB▼ 67.19%
themes/puzzles/puzzles.png279.46KB116.29KB▼ 58.39%
images/ucp_icon.png0.80KB0.89KB0.00%
themes/people/people.png131.50KB44.69KB▼ 66.02%
images/thumbnails/rocket_2.png22.45KB7.94KB▼ 64.62%