68% dh-local-seo

Code Review | Wordpress Local SEO

WordPress plugin Wordpress Local SEO scored68%from 54 tests.

About plugin

  • Plugin page: dh-local-seo
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.8.1
  • WordPress version: 6.3.1
  • First release: Jun 13, 2013
  • Latest release: Mar 29, 2014
  • Number of updates: 52
  • Update frequency: every 5.6 days
  • Top authors: wansinn (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /7,859 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.91MB] [CPU: ▼47.62ms] Passed 4 tests

An overview of server-side resources used by Wordpress Local SEO
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.06 ▼0.4023.29 ▼19.53
Dashboard /wp-admin3.11 ▼0.2320.35 ▼45.31
Posts /wp-admin/edit.php3.11 ▼0.2417.93 ▼34.54
Add New Post /wp-admin/post-new.php3.11 ▼2.7718.33 ▼91.10
Media Library /wp-admin/upload.php3.11 ▼0.1217.61 ▼18.42
WP Local Seo /wp-admin/options-general.php?page=wp-localseo-settings3.1118.31

Server storage [IO: ▲0.37MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 9 new options
New WordPress options
wp_localseo
widget_recent-comments
wpl_version
db_upgraded
wpl_rewrite_rules
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Wordpress Local SEO
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,129 ▲38315.99 ▲1.6228.65 ▲26.8342.78 ▼0.88
Dashboard /wp-admin2,338 ▲1616.08 ▲0.48111.33 ▲18.9240.86 ▼10.66
Posts /wp-admin/edit.php2,279 ▲1763.34 ▲1.3949.58 ▲13.8533.25 ▲0.63
Add New Post /wp-admin/post-new.php7,802 ▲6,27628.77 ▲5.73889.16 ▲202.1848.54 ▼15.20
Media Library /wp-admin/upload.php1,419 ▲224.12 ▼0.0780.80 ▼20.3546.50 ▲0.29
WP Local Seo /wp-admin/options-general.php?page=wp-localseo-settings2,0253.0042.4933.58

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/dh-local-seo/wp-local-seo.php+146
    Undefined index: wpl_reset
  • This plugin does not fully uninstall, leaving 9 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • wpl_rewrite_rules
    • wp_localseo
    • widget_theysaidso_widget
    • wpl_version
    • widget_recent-posts
    • theysaidso_admin_options

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=wp-localseo-settings
    • > Notice in wp-content/plugins/dh-local-seo/wp-local-seo.php+146
    Undefined index: wpl_reset
    • > GET request to /wp-admin/options-general.php?page=wp-localseo-settings
    • > Notice in wp-content/plugins/dh-local-seo/wp-local-seo.php+1972
    Undefined index: flush_rewrite_rules
    • > GET request to /wp-admin/options-general.php?page=wp-localseo-settings
    • > Notice in wp-content/plugins/dh-local-seo/wp-local-seo.php+546
    Undefined index: wp_block
    • > GET request to /wp-admin/options-general.php?page=wp-localseo-settings
    • > Notice in wp-content/plugins/dh-local-seo/wp-local-seo.php+546
    Undefined index: wp_navigation
    • > GET request to /wp-admin/options-general.php?page=wp-localseo-settings
    • > Notice in wp-content/plugins/dh-local-seo/wp-local-seo.php+478
    Undefined index: reset
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-localseo-settings
    • > Notice in wp-content/plugins/dh-local-seo/wp-local-seo.php+760
    Undefined index: disabled
    • > GET request to /wp-admin/options-general.php?page=wp-localseo-settings
    • > Notice in wp-content/plugins/dh-local-seo/wp-local-seo.php+759
    Undefined index: help

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
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/dh-local-seo/location-template-mini.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/dh-local-seo/location-template.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/dh-local-seo/inc/business_list.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dh-local-seo/wp-local-seo.php:89

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: seo, location, digitaleheimat, geo, local...

dh-local-seo/wp-local-seo.php 85% from 13 tests

The main PHP file in "Wordpress Local SEO" ver. 2.3 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 147 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("dh-local-seo.php" instead of "wp-local-seo.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin2,771 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP44244181,575
PO File1307333800
JavaScript46824301
CSS114095

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity227.00
▷ Minimum class complexity227.00
▷ Maximum class complexity227.00
Average method complexity5.19
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods54
▷ Static methods00.00%
▷ Public methods54100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
2 PNG files occupy 0.15MB with 0.08MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png82.80KB39.55KB▼ 52.23%
assets/screenshot-1.png70.04KB30.42KB▼ 56.57%