10% dh-is-coming-soon

Code Review | DH - is Coming Soon

WordPress plugin DH - is Coming Soon scored10%from 54 tests.

About plugin

  • Plugin page: dh-is-coming-soon
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.5
  • WordPress version: 6.3.1
  • First release: May 19, 2018
  • Latest release: May 19, 2018
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: k0z3y (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /540 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
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/dh-is-coming-soon/index.php+131
    Use of undefined constant dh_submit_donation - assumed 'dh_submit_donation' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.88MB] [CPU: ▼50.67ms] Passed 4 tests

This is a short check of server-side resources used by DH - is Coming Soon
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.365.72 ▼35.61
Dashboard /wp-admin2.12 ▼1.186.75 ▼42.43
Posts /wp-admin/edit.php2.12 ▼1.235.85 ▼41.56
Add New Post /wp-admin/post-new.php2.12 ▼3.766.09 ▼83.08
Media Library /wp-admin/upload.php2.12 ▼1.105.25 ▼27.95
Submit a Donation /wp-admin/admin.php?page=dh-submit-donation2.125.64
is Coming Soon /wp-admin/admin.php?page=dh-iscomingsoon2.126.23

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for DH - is Coming Soon
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,970 ▲22415.06 ▲0.681.80 ▲0.0244.18 ▲0.29
Dashboard /wp-admin2,379 ▲2056.81 ▲1.93125.23 ▲11.2692.97 ▲37.24
Posts /wp-admin/edit.php2,285 ▲1963.75 ▲1.7548.11 ▲13.5560.56 ▲25.06
Add New Post /wp-admin/post-new.php1,544 ▲1123.59 ▲0.53639.79 ▼8.76174.00 ▲114.66
Media Library /wp-admin/upload.php1,421 ▲394.44 ▲0.2583.67 ▼23.0877.31 ▲31.66
Submit a Donation /wp-admin/admin.php?page=dh-submit-donation1,1143.3341.2062.65
is Coming Soon /wp-admin/admin.php?page=dh-iscomingsoon1,7733.4656.5598.59

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
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/dh-is-coming-soon/index.php+131
    Use of undefined constant dh_submit_donation - assumed 'dh_submit_donation' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dh-iscomingsoon
    • > Warning in wp-content/plugins/dh-is-coming-soon/index.php+131
    Use of undefined constant dh_submit_donation - assumed 'dh_submit_donation' (this will throw an Error in a future version of PHP)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dh-iscomingsoon
    • > User deprecated in wp-includes/functions.php+5453
    Function add_object_page is deprecated since version 4.5.0! Use add_menu_page() instead.
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dh-iscomingsoon
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dh-iscomingsoon
    • > Notice in wp-content/plugins/dh-is-coming-soon/admin_menu.php+107
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant dh_submit_donation - assumed 'dh_submit_donation' (this will throw an Error in a future version of PHP) in wp-content/plugins/dh-is-coming-soon/index.php on line 131
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dh-is-coming-soon/index.php:343

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (If "DH - is Coming Soon" active.), #2 (All settings on WP Dashboard.)
You can take inspiration from this readme.txt

dh-is-coming-soon/index.php 92% from 13 tests

Analyzing the main PHP file in "DH - is Coming Soon" version 1.0
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("dh-is-coming-soon.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected1,011 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS4614567
PHP34324401
JavaScript493143

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
18 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/overlays/15.png0.13KB0.12KB▼ 13.87%
assets/img/overlays/12.png0.13KB0.11KB▼ 13.85%
assets/img/overlays/10.png0.13KB0.10KB▼ 22.63%
assets/img/dh.png19.83KB0.78KB▼ 96.07%
assets/img/bitcoin.png7.40KB2.06KB▼ 72.15%