84% easy-hreflang

Code Review | Easy hreflang

WordPress plugin Easy hreflang scored84%from 54 tests.

About plugin

  • Plugin page: easy-hreflang
  • Plugin version: 1.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.9.4
  • WordPress version: 6.3.1
  • First release: May 7, 2018
  • Latest release: May 7, 2018
  • Number of updates: 11
  • Update frequency: every 1.9 days
  • Top authors: educamia.com (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /4,036 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▲0.77ms] Passed 4 tests

This is a short check of server-side resources used by Easy hreflang
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0857.44 ▲12.80
Dashboard /wp-admin3.40 ▲0.1050.40 ▼4.19
Posts /wp-admin/edit.php3.45 ▲0.1056.01 ▲8.70
Add New Post /wp-admin/post-new.php5.98 ▲0.1097.54 ▲1.79
Media Library /wp-admin/upload.php3.33 ▲0.1034.01 ▼3.21

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
ehlCurrentVersion
ehlCurrentType
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy hreflang
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲3514.24 ▼0.101.69 ▼0.1941.20 ▼2.08
Dashboard /wp-admin2,197 ▲275.65 ▼0.05115.77 ▲3.2782.32 ▲39.11
Posts /wp-admin/edit.php2,120 ▲201.95 ▼0.1236.47 ▼4.2333.72 ▼6.79
Add New Post /wp-admin/post-new.php1,543 ▲1723.06 ▼0.57728.29 ▲36.6050.63 ▼4.63
Media Library /wp-admin/upload.php1,414 ▲144.13 ▼0.10111.97 ▲7.4445.81 ▼4.92

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 8 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • ehlCurrentType
    • widget_recent-posts
    • widget_theysaidso_widget
    • ehlCurrentVersion
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
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 plugin_dir_path() in wp-content/plugins/easy-hreflang/includes/ehl-functions.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/easy-hreflang/includes/ehl-acp-page.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/easy-hreflang/easy-hreflang.php:16

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: translation, international, rankings, hreflang, gtranslate...

easy-hreflang/easy-hreflang.php Passed 13 tests

The primary PHP file in "Easy hreflang" version 1.2 is used by WordPress to initiate all plugin functionality
65 characters long description:
Easy hreflang help you easily set hreflang tags on your website !

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
There were no executable files found in this plugin389 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP54833379
CSS12010

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.27
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/icon.png0.92KB1.13KB0.00%