72% eazy-under-construction

Code Review | Eazy Under Construction

WordPress plugin Eazy Under Construction scored72%from 54 tests.

About plugin

  • Plugin page: eazy-under-constr...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-4.9.1
  • WordPress version: 6.3.1
  • First release: Aug 8, 2015
  • Latest release: Jan 2, 2018
  • Number of updates: 9
  • Update frequency: every 97.6 days
  • Top authors: r0bsc0tt (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

700+ active /11,045 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.22ms] Passed 4 tests

This is a short check of server-side resources used by Eazy Under Construction
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0244.61 ▲1.34
Dashboard /wp-admin3.32 ▼0.0248.62 ▼18.23
Posts /wp-admin/edit.php3.37 ▲0.0249.55 ▼0.35
Add New Post /wp-admin/post-new.php5.90 ▲0.0291.23 ▼10.68
Media Library /wp-admin/upload.php3.24 ▲0.0237.18 ▲0.40
Under Construction /wp-admin/options-general.php?page=underConstructionMainOptions3.3239.15

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 8 new options
New WordPress options
underConstructionDisplayOption
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
underConstructionHTTPStatus
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Eazy Under Construction
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.20 ▼1.171.94 ▲0.2043.41 ▼2.09
Dashboard /wp-admin2,207 ▲225.81 ▼0.07111.71 ▲4.2644.14 ▲5.88
Posts /wp-admin/edit.php2,090 ▲12.01 ▼0.0236.08 ▲0.6832.13 ▼6.19
Add New Post /wp-admin/post-new.php1,536 ▲323.02 ▲1.93617.08 ▼65.8748.84 ▼16.85
Media Library /wp-admin/upload.php1,392 ▲44.20 ▼0.0994.67 ▼9.1542.90 ▼3.40
Under Construction /wp-admin/options-general.php?page=underConstructionMainOptions1,1912.7043.5927.95

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=underConstructionMainOptions
    • > Warning in wp-content/plugins/eazy-under-construction/ucOptions.php+249
    count(): Parameter must be an array or an object that implements Countable
    • > GET request to /wp-admin/options-general.php?page=underConstructionMainOptions
    • > Notice in wp-content/plugins/eazy-under-construction/ucOptions.php+251
    Trying to access array offset on value of type bool

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
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/eazy-under-construction/underConstruction.php:306
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_template_directory() in wp-content/plugins/eazy-under-construction/ucOptions.php:149

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=underConstructionMainOptions
    • > Javascript (warning) in unknown
    https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js?ver=1.9.0 30 A parser-blocking, cross site (i.e. different eTLD+1) script, https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/builder.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
    • > GET request to /wp-admin/options-general.php?page=underConstructionMainOptions
    • > Javascript (warning) in unknown
    https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js?ver=1.9.0 30 A parser-blocking, cross site (i.e. different eTLD+1) script, https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/effects.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
    • > GET request to /wp-admin/options-general.php?page=underConstructionMainOptions
    • > Javascript (warning) in unknown
    https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js?ver=1.9.0 30 A parser-blocking, cross site (i.e. different eTLD+1) script, https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/dragdrop.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
    • > GET request to /wp-admin/options-general.php?page=underConstructionMainOptions
    • > Javascript (warning) in unknown
    https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js?ver=1.9.0 30 A parser-blocking, cross site (i.e. different eTLD+1) script, https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/controls.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
    • > GET request to /wp-admin/options-general.php?page=underConstructionMainOptions
    • > Javascript (warning) in unknown
    https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js?ver=1.9.0 30 A parser-blocking, cross site (i.e. different eTLD+1) script, https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/slider.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
    • > GET request to /wp-admin/options-general.php?page=underConstructionMainOptions
    • > Javascript (warning) in unknown
    https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js?ver=1.9.0 30 A parser-blocking, cross site (i.e. different eTLD+1) script, https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/sound.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: security, coming soon, under construction, construction, private...

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

"Eazy Under Construction" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 149 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("eazy-under-construction.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
Good job! No executable or dangerous file extensions detected817 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP311763586
PO File26884186
JavaScript210045

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin