10% transport-and-business-locator

Code Review | Transport and Business Locator

WordPress plugin Transport and Business Locator scored10%from 54 tests.

About plugin

  • Plugin page: transport-and-bus...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4.0
  • WordPress version: 6.3.1
  • First release: Apr 14, 2015
  • Latest release: May 18, 2020
  • Number of updates: 18
  • Update frequency: every 103.4 days
  • Top authors: bobcares_plugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,055 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/transport-and-business-locator/transport_business_locator.php+501
    Methods with the same name as their class will not be constructors in a future version of PHP; transport_business_locator has a deprecated constructor

Server metrics [RAM: ▼1.86MB] [CPU: ▼54.83ms] Passed 4 tests

This is a short check of server-side resources used by Transport and Business Locator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.12 ▼1.344.59 ▼44.46
Dashboard /wp-admin2.14 ▼1.165.45 ▼48.60
Posts /wp-admin/edit.php2.14 ▼1.215.45 ▼41.45
Add New Post /wp-admin/post-new.php2.14 ▼3.749.37 ▼84.82
Media Library /wp-admin/upload.php2.14 ▼1.084.90 ▼38.65

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Transport and Business Locator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.20 ▼0.161.63 ▼0.3140.77 ▼1.82
Dashboard /wp-admin2,211 ▲345.63 ▼0.0390.68 ▼9.0540.74 ▼1.53
Posts /wp-admin/edit.php2,113 ▲131.98 ▼0.1339.60 ▲3.0135.08 ▼0.63
Add New Post /wp-admin/post-new.php1,538 ▲1022.99 ▼0.08610.87 ▼77.4147.48 ▼12.79
Media Library /wp-admin/upload.php1,416 ▲164.28 ▲0.11100.16 ▼13.2044.71 ▼2.01

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/transport-and-business-locator/transport_business_locator.php+501
    Methods with the same name as their class will not be constructors in a future version of PHP; transport_business_locator has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_transport_business_locator
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, 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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/transport-and-business-locator/transport_business_locator.php:375

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: church locator, place locator, atm locator, pharmacy locator, mosque locator...

transport-and-business-locator/transport_business_locator.php 85% from 13 tests

The primary PHP file in "Transport and Business Locator" version 1.1.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 212 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("transport-and-business-locator.php" instead of "transport_business_locator.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected531 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP198123402
JavaScript12222129

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
PNG images were not found in this plugin