64% lb-select-location

Code Review | LB Select Location

WordPress plugin LB Select Location scored 64% from 54 tests.

About plugin

  • Plugin page: lb-select-location
  • Plugin version: 2.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.6
  • WordPress version: 6.3.1
  • First release: Aug 20, 2013
  • Latest release: Feb 24, 2014
  • Number of updates: 12
  • Update frequency: every 15.7 days
  • Top authors: Bonny85 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,391 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.48ms] Passed 4 tests

This is a short check of server-side resources used by LB Select Location
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0842.56 ▼0.71
Dashboard /wp-admin3.38 ▲0.0846.75 ▼1.25
Posts /wp-admin/edit.php3.49 ▲0.1447.33 ▼0.65
Add New Post /wp-admin/post-new.php5.98 ▲0.0984.64 ▼15.31
Media Library /wp-admin/upload.php3.30 ▲0.0737.41 ▲0.03

Server storage [IO: ▲1.05MB] [DB: ▲0.89MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: 3 new tables, 6 new options
New tables
wp_sl_province
wp_sl_regioni
wp_sl_comuni
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for LB Select Location
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲17213.68 ▼0.707.05 ▲5.3139.43 ▼0.22
Dashboard /wp-admin2,213 ▲245.84 ▲0.89104.47 ▼2.8037.77 ▼5.99
Posts /wp-admin/edit.php2,096 ▲102.02 ▲0.0037.52 ▼1.8035.43 ▲1.82
Add New Post /wp-admin/post-new.php1,521 ▼1223.06 ▼0.29624.22 ▼53.6974.56 ▲19.10
Media Library /wp-admin/upload.php1,398 ▲104.22 ▲0.0195.73 ▼5.5642.55 ▼2.84

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-includes/class-wpdb.php+789
    Undefined property: wpdb::$preix
  • The uninstall procedure failed, leaving 3 tables in the database
    • wp_sl_regioni
    • wp_sl_comuni
    • wp_sl_province
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant TB_COM - assumed 'TB_COM' (this will throw an Error in a future version of PHP) in wp-content/plugins/lb-select-location/class/select.class.php on line 312
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lb-select-location/class/select-shortcode.class.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/lb-select-location/lb-select-location.php:36
    • > PHP Warning
      Use of undefined constant TB_REG - assumed 'TB_REG' (this will throw an Error in a future version of PHP) in wp-content/plugins/lb-select-location/class/select.class.php on line 312
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lb-select-location/class/select-ajax.class.php:21
    • > PHP Warning
      Use of undefined constant TB_PRO - assumed 'TB_PRO' (this will throw an Error in a future version of PHP) in wp-content/plugins/lb-select-location/class/select.class.php on line 312

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 96% from 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
5 plugin tags: italia, province, selezione, regioni, comuni

lb-select-location/lb-select-location.php 92% from 13 tests

The main PHP script in "LB Select Location" version 2.6.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 341 characters long)

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
There were no executable files found in this plugin8,727 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
SQL1008,279
PHP5143320325
JavaScript1264388
CSS16335

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity6.25
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.78
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods2074.07%
▷ Protected methods00.00%
▷ Private methods725.93%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin