10% mojo-under-construction

Code Review | Mojo Under Construction

WordPress plugin Mojo Under Construction scored10%from 54 tests.

About plugin

  • Plugin page: mojo-under-constr...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-4.7.1
  • WordPress version: 6.3.1
  • First release: Aug 1, 2015
  • Latest release: Jan 12, 2017
  • Number of updates: 11
  • Update frequency: every 48.2 days
  • Top authors: mojowill (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

700+ active /18,832 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • The plugin did not install without errors
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Server metrics [RAM: ▼1.89MB] [CPU: ▼50.04ms] Passed 4 tests

Server-side resources used by Mojo Under Construction
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.378.87 ▼32.39
Dashboard /wp-admin2.11 ▼1.195.99 ▼39.60
Posts /wp-admin/edit.php2.11 ▼1.246.13 ▼41.54
Add New Post /wp-admin/post-new.php2.11 ▼3.776.35 ▼86.63
Media Library /wp-admin/upload.php2.11 ▼1.115.53 ▼27.32
Under Construction /wp-admin/options-general.php?page=underConstructionMainOptions2.115.63

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
underConstructionDisplayOption
theysaidso_admin_options
underConstructionHTTPStatus
can_compress_scripts
widget_theysaidso_widget
underconstruction_global_notification

Browser metrics Passed 4 tests

Checking browser requirements for Mojo Under Construction
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲5813.22 ▼1.361.86 ▼0.2338.94 ▼10.61
Dashboard /wp-admin2,207 ▲195.79 ▼0.12103.89 ▼9.4038.69 ▲1.49
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0139.40 ▲2.0135.68 ▲2.55
Add New Post /wp-admin/post-new.php1,537 ▲823.00 ▲4.81644.95 ▲39.2660.31 ▲5.84
Media Library /wp-admin/upload.php1,386 ▲14.22 ▲0.0498.84 ▼0.5842.02 ▼1.25
Under Construction /wp-admin/options-general.php?page=underConstructionMainOptions1,2022.8444.6526.11

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
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • underConstructionArchive

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=underConstructionMainOptions
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
    • > GET request to /wp-admin/options-general.php?page=underConstructionMainOptions
    • > Notice in wp-content/plugins/mojo-under-construction/options-page.php+153
    Undefined index: underconstruction_global_notification
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=underConstructionMainOptions
    • > Warning in wp-content/plugins/mojo-under-construction/options-page.php+258
    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/mojo-under-construction/options-page.php+260
    Trying to access array offset on value of type bool

SRP Passed 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
The SRP test was a success

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
  • 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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: under construction, construction, private, preview, coming soon...

mojo-under-construction/mojo-contruction.php 92% from 13 tests

The main file in "Mojo Under Construction" v. 1.1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("mojo-under-construction.php" instead of "mojo-contruction.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 plugin765 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP411171534
PO File26884186
JavaScript210045

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin