79% wp-hydra

Code Review | WP Hydra

WordPress plugin WP Hydra scored79%from 54 tests.

About plugin

  • Plugin page: wp-hydra
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1
  • WordPress version: 6.3.1
  • First release: Dec 17, 2014
  • Latest release: Jan 23, 2019
  • Number of updates: 23
  • Update frequency: every 65.1 days
  • Top authors: tyxla (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active /20,001 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: ▼4.33ms] Passed 4 tests

A check of server-side resources used by WP Hydra
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.44 ▼0.05
Dashboard /wp-admin3.34 ▼0.0145.17 ▼15.30
Posts /wp-admin/edit.php3.39 ▲0.0347.48 ▲1.65
Add New Post /wp-admin/post-new.php5.92 ▲0.04109.10 ▼3.18
Media Library /wp-admin/upload.php3.26 ▲0.0336.07 ▲1.21

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

WP Hydra: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼1.521.74 ▼0.0045.98 ▲3.40
Dashboard /wp-admin2,206 ▲214.86 ▼1.00108.50 ▲3.1641.99 ▼1.79
Posts /wp-admin/edit.php2,089 ▼32.01 ▼0.0238.50 ▼1.3334.76 ▲0.57
Add New Post /wp-admin/post-new.php1,533 ▲1423.24 ▲0.29652.18 ▲61.5359.47 ▲12.29
Media Library /wp-admin/upload.php1,382 ▼34.25 ▲0.0299.71 ▲0.5842.51 ▼1.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-hydra/tests/bootstrap.php
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-hydra/tests/test-setup-upload-dir.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-hydra/tests/test-is-ssl.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-hydra/tests/test-setup-content.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-hydra/tests/test-construct.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-hydra/tests/test-global-var.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-hydra/tests/test-replace-domain.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-hydra/tests/test-setup-domain.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 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: hydra, domains, multiple, wp, installation...

wp-hydra/wp-hydra.php Passed 13 tests

The primary PHP file in "WP Hydra" version 1.2 is used by WordPress to initiate all plugin functionality
81 characters long description:
Allows one WordPress installation to be resolved and browsed at multiple domains.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected668 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP10121343356
Bourne Shell12111120
YAML210072
Markdown239058
XML24238
JSON10024

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.05
Average class complexity1.60
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.13
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods46
▷ Static methods00.00%
▷ Public methods4597.83%
▷ Protected methods12.17%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected