67% easy-under-construction

Code Review | Under Construction

WordPress plugin Under Construction scored 67% from 54 tests.

About plugin

  • Plugin page: easy-under-constr...
  • Plugin version: 4.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.9
  • WordPress version: 5.9.2
  • First release: Nov 12, 2020
  • Latest release: Mar 18, 2022
  • Number of updates: 15
  • Update frequency: every 32.9 days
  • Top authors: linekal (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active / 9,879 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲4.03MB] [CPU: ▼327.18ms] Passed 4 tests

An overview of server-side resources used by Under Construction
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /8.41 ▲4.8926.03 ▼24.92
Dashboard /wp-admin8.42 ▲5.0126.73 ▼6.48
Posts /wp-admin/edit.php8.43 ▲4.7823.83 ▼14.15
Add New Post /wp-admin/post-new.php8.42 ▲1.4525.38 ▼1,260.67
Media Library /wp-admin/upload.php8.42 ▲5.1223.19 ▼8.98
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius8.4323.98

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 183 new files
Database: no new tables, 5 new options
New WordPress options
fs_active_plugins
fs_debug_mode
fs_accounts
easyunderconstruction_global_notification
fs_gdpr

Browser metrics Passed 4 tests

Under Construction: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,850 ▲10615.91 ▲0.136.51 ▲0.842.55 ▲0.30
Dashboard /wp-admin2,947 ▲936.07 ▼0.16116.18 ▼18.53169.62 ▲12.48
Posts /wp-admin/edit.php2,743 ▲493.26 ▲0.0165.66 ▼3.95157.22 ▲19.51
Add New Post /wp-admin/post-new.php1,708 ▼5016.07 ▼6.00417.80 ▼18.65164.53 ▲9.65
Media Library /wp-admin/upload.php1,751 ▲535.68 ▲0.16145.53 ▲2.22202.83 ▲17.03
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,4542.5564.01121.83

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • The plugin did not uninstall gracefully
    • > Warning in wp-includes/class-wp-hook.php+307
    call_user_func_array() expects parameter 1 to be a valid callback, function 'easyunderConstructionInitTranslation' not found or invalid function name
  • The uninstall procedure has failed, leaving 5 options in the database
    • fs_debug_mode
    • fs_accounts
    • fs_active_plugins
    • easyunderConstructionArchive
    • fs_gdpr

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=freemius
    • > Warning in wp-includes/class-wp-hook.php+307
    call_user_func_array() expects parameter 1 to be a valid callback, function 'easyunderConstructionInitTranslation' not found or invalid function name

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/easy-under-construction/services.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_template_directory() in wp-content/plugins/easy-under-construction/easyucOptions.php:114

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: coming soon, coming soon page, under construction, maintenance, under construction page

easy-under-construction/underConstruction.php 85% from 13 tests

The main PHP script in "Under Construction" version 4.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 155 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("easy-under-construction.php" instead of "underConstruction.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected32,867 lines of code in 132 files:
LanguageFilesBlank linesComment linesLines of code
PHP1147,25216,12432,171
JavaScript44359240
CSS1220215
Markdown1680214
JSON10027

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
It is recommended to fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 2,910)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity88.98
▷ Minimum class complexity1.00
▷ Maximum class complexity2,910.00
Average method complexity4.60
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes46
▷ Abstract classes24.35%
▷ Concrete classes4495.65%
▷ Final classes00.00%
Methods1,157
▷ Static methods17314.95%
▷ Public methods81770.61%
▷ Protected methods151.30%
▷ Private methods32528.09%
Functions104
▷ Named functions104100.00%
▷ Anonymous functions00.00%
Constants124
▷ Global constants9979.84%
▷ Class constants2520.16%
▷ Public constants25100.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
10 PNG files occupy 2.08MB with 1.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icon-256x256.png34.87KB9.33KB▼ 73.24%
templates/images/thumb_three.png179.12KB60.68KB▼ 66.12%
templates/images/ucthree.png188.44KB50.09KB▼ 73.42%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
templates/images/profile-min.png323.85KB329.75KB0.00%