90% wp-get-directions

Code Review | WP Get Directions

WordPress plugin WP Get Directions scored90%from 54 tests.

About plugin

  • Plugin page: wp-get-directions
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0.1
  • WordPress version: 6.3.1
  • First release: Jul 10, 2019
  • Latest release: Aug 4, 2022
  • Number of updates: 9
  • Update frequency: every 124.6 days
  • Top authors: blazeconcepts (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,068 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.69ms] Passed 4 tests

This is a short check of server-side resources used by WP Get Directions
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.26 ▼1.78
Dashboard /wp-admin3.35 ▲0.0048.34 ▼14.53
Posts /wp-admin/edit.php3.40 ▲0.0448.95 ▼0.12
Add New Post /wp-admin/post-new.php5.93 ▲0.04100.99 ▲9.69
Media Library /wp-admin/upload.php3.27 ▲0.0447.28 ▲13.09
Get Directions /wp-admin/options-general.php?page=blz_get_directions3.2432.75

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

WP Get Directions: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.24 ▼1.141.71 ▲0.1439.37 ▲1.04
Dashboard /wp-admin2,207 ▲195.83 ▲0.0294.57 ▼11.6340.45 ▼4.89
Posts /wp-admin/edit.php2,090 ▲41.97 ▼0.0239.59 ▲4.4833.55 ▲0.08
Add New Post /wp-admin/post-new.php1,536 ▲323.14 ▼0.11588.22 ▼77.9653.10 ▲2.00
Media Library /wp-admin/upload.php1,395 ▲74.29 ▲0.0895.49 ▼1.6140.35 ▼3.90
Get Directions /wp-admin/options-general.php?page=blz_get_directions8242.1723.3230.50

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: maps, a to b, directions, google, pinpoint

wp-get-directions/blz-get-directions.php 92% from 13 tests

The entry point to "WP Get Directions" version 1.0.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-get-directions.php" instead of "blz-get-directions.php")

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
Good job! No executable or dangerous file extensions detected174 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP35452174

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.55
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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