84% hoo-hreflang-tags

Code Review | Hoo Hreflang Tags

WordPress plugin Hoo Hreflang Tags scored84%from 54 tests.

About plugin

  • Plugin page: hoo-hreflang-tags
  • Plugin version: 1.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Nov 6, 2018
  • Latest release: Nov 11, 2018
  • Number of updates: 10
  • Update frequency: every 0.5 days
  • Top authors: hoosoft (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /1,275 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.17ms] Passed 4 tests

An overview of server-side resources used by Hoo Hreflang Tags
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0543.55 ▼4.07
Dashboard /wp-admin3.37 ▲0.0753.17 ▼0.80
Posts /wp-admin/edit.php3.50 ▲0.1460.48 ▲5.47
Add New Post /wp-admin/post-new.php5.96 ▲0.0792.07 ▼22.39
Media Library /wp-admin/upload.php3.28 ▲0.0539.85 ▲2.58
HREFLANG /wp-admin/options-general.php?page=hoo-hreflang-tags3.2837.72

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Hoo Hreflang Tags
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,955 ▲19414.38 ▲0.092.31 ▲0.3839.92 ▼3.48
Dashboard /wp-admin2,336 ▲1566.13 ▲0.37114.63 ▲22.2642.41 ▲0.66
Posts /wp-admin/edit.php2,265 ▲1653.49 ▲1.5054.00 ▲14.3331.77 ▼2.79
Add New Post /wp-admin/post-new.php7,048 ▲5,52218.90 ▼4.66964.63 ▲281.0655.49 ▼4.72
Media Library /wp-admin/upload.php1,410 ▲74.12 ▼0.0884.01 ▼21.6046.99 ▼0.12
HREFLANG /wp-admin/options-general.php?page=hoo-hreflang-tags9833.0836.5424.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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 following issues need your attention
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/hoo-hreflang-tags/includes/metabox/options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/hoo-hreflang-tags/includes/metabox/init.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/hoo-hreflang-tags/includes/metabox/options.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
1 plugin tags: hreflang tags

hoo-hreflang-tags/hoo-hreflang-tags.php Passed 13 tests

This is the main PHP file of "Hoo Hreflang Tags" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
122 characters long description:
Add Hreflang meta tags to the head of your multiple languages WordPress sites. It is compatible with the elementor plugin.

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 plugin4,616 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript43063742,169
PHP85521,0071,904
CSS36121543

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity58.43
▷ Minimum class complexity10.00
▷ Maximum class complexity136.00
Average method complexity3.85
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods141
▷ Static methods3524.82%
▷ Public methods13998.58%
▷ Protected methods21.42%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/metabox/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
includes/metabox/images/ico-delete.png0.70KB0.72KB0.00%
includes/metabox/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%
includes/metabox/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
includes/metabox/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%