72% underconstruction

Code Review | underConstruction

WordPress plugin underConstruction scored72%from 54 tests.

About plugin

  • Plugin page: underconstruction
  • Plugin version: 1.21
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-5.9
  • WordPress version: 6.3.1
  • First release: Jun 21, 2009
  • Latest release: Aug 1, 2022
  • Number of updates: 58
  • Update frequency: every 82.6 days
  • Top authors: jkmassel (63.79%)grimmdude (29.31%)marnietave (6.9%)noahkagan (5.17%)

Code review

54 tests

User reviews

111 reviews

Install metrics

60,000+ active /1,643,438 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▲0.35ms] Passed 4 tests

A check of server-side resources used by underConstruction
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.84 ▼4.07
Dashboard /wp-admin3.33 ▲0.0251.72 ▲5.15
Posts /wp-admin/edit.php3.38 ▲0.0250.12 ▲1.79
Add New Post /wp-admin/post-new.php5.91 ▲0.02100.09 ▼0.87
Media Library /wp-admin/upload.php3.25 ▲0.0238.12 ▲4.57
Under Construction /wp-admin/admin.php?page=under-construction3.3540.50
AppSumo /wp-admin/admin.php?page=uc_go_appsumo_pro3.0429.46
Other Tools /wp-admin/admin.php?page=under-construction-plugin-other-tools3.2531.72

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 21 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
underConstructionDisplayOption
widget_theysaidso_widget
db_upgraded
widget_recent-posts
underconstruction_global_notification
theysaidso_admin_options
can_compress_scripts
underConstructionHTTPStatus

Browser metrics Passed 4 tests

Checking browser requirements for underConstruction
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲10313.16 ▼1.051.73 ▼0.1833.13 ▼16.28
Dashboard /wp-admin2,244 ▲594.85 ▼1.05105.66 ▲5.9346.05 ▲1.27
Posts /wp-admin/edit.php2,127 ▲352.04 ▲0.0739.34 ▼1.2438.12 ▲1.17
Add New Post /wp-admin/post-new.php1,546 ▲1823.31 ▲4.87596.73 ▼19.8155.02 ▲0.80
Media Library /wp-admin/upload.php1,429 ▲414.24 ▲0.0497.77 ▼2.2647.26 ▲2.49
Under Construction /wp-admin/admin.php?page=under-construction1,2131.7726.3248.59
AppSumo /wp-admin/admin.php?page=uc_go_appsumo_pro2,26215.26588.82168.07
Other Tools /wp-admin/admin.php?page=under-construction-plugin-other-tools1,0042.2125.5338.80

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/underconstruction/appsumo-capture-form.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_template_directory() in wp-content/plugins/underconstruction/ucOptions.php:157
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/underconstruction/underConstruction.php:380
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_thickbox() in wp-content/plugins/underconstruction/other_tools.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=uc_go_appsumo_pro
    • > Network (severe)
    https://appsumo.com/tools/wordpress/?utm_source=sumo&utm_medium=wp-widget&utm_campaign=underconstruction - Failed to load resource: the server responded with a status of 404 ()
    • > GET request to /wp-admin/admin.php?page=uc_go_appsumo_pro
    • > Javascript (severe) in unknown
    https://appsumo2-cdn.appsumo.com/static/dist/js/vue_bridge.61ea1a9c.js 6:75186 Uncaught TypeError: (void 0) is not a function
    • > GET request to /wp-admin/admin.php?page=uc_go_appsumo_pro
    • > Console-api (warning) in unknown
    https://accounts.google.com/gsi/client 40:457 "[GSI_LOGGER]: Relative login_uri was provided. Use absolute url instead. Relative login_uri may be considered invalid in the future."

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: security, under construction, construction, private, preview...

underconstruction/underConstruction.php 85% from 13 tests

"underConstruction" version 1.21's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 149 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("underconstruction.php" instead of "underConstruction.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
Everything looks great! No dangerous files found in this plugin1,373 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP514480718
CSS2332313
PO File26884186
SVG302104
JavaScript310052

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/products/appsumo-logo.png5.92KB6.11KB0.00%
images/products/sumo-logo.png6.58KB3.19KB▼ 51.51%