83% kento-google-maps

Code Review | Google Direction

WordPress plugin Google Direction scored83%from 54 tests.

About plugin

  • Plugin page: kento-google-maps
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.3
  • WordPress version: 6.3.1
  • First release: Sep 19, 2015
  • Latest release: Sep 22, 2015
  • Number of updates: 7
  • Update frequency: every 0.4 days
  • Top authors: jimitupadhyay (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,180 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.16MB] [CPU: ▼6.51ms] Passed 4 tests

A check of server-side resources used by Google Direction
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1638.48 ▼0.79
Dashboard /wp-admin3.46 ▲0.1544.87 ▲0.74
Posts /wp-admin/edit.php3.57 ▲0.2149.75 ▼0.19
Add New Post /wp-admin/post-new.php6.04 ▲0.1684.86 ▼25.44
Media Library /wp-admin/upload.php3.38 ▲0.1536.21 ▲0.38
Manage Locations /wp-admin/edit.php?post_type=kg-locations3.4235.59

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Google Direction
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲15213.32 ▼1.241.94 ▲0.3140.07 ▼0.06
Dashboard /wp-admin2,268 ▲805.01 ▼0.90108.96 ▲7.4038.50 ▲0.35
Posts /wp-admin/edit.php2,151 ▲802.25 ▲0.2141.13 ▲5.7535.38 ▲1.17
Add New Post /wp-admin/post-new.php1,555 ▲4117.76 ▼0.02679.89 ▲73.6149.30 ▼2.90
Media Library /wp-admin/upload.php1,453 ▲684.28 ▲0.0999.46 ▲1.4942.04 ▼4.70
Manage Locations /wp-admin/edit.php?post_type=kg-locations1,1222.2233.8329.64

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kento-google-maps/kg-locations-cpt.php:45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/kento-google-maps/kg-google-maps.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/kento-google-maps/kg-google-maps-ui.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kento-google-maps/kg-maps-cpt.php:51

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 86% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Easily add Google Location For finding Direction from source to destination @ anywhere), #2 (Easy to use user interface, so you don't need to remember attributes), #3 (Simple short code, you can use without UI also)
You can look at the official readme.txt

kento-google-maps/kg-google-maps.php 77% from 13 tests

The primary PHP file in "Google Direction" version 1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 176 characters long)
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("kento-google-maps.php" instead of "kg-google-maps.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected805 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP413986573
CSS33716165
JavaScript215667

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
20 PNG files occupy 0.10MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/followus.png10.69KB4.12KB▼ 61.50%
images/ui-icons_8c291d_256x240.png4.44KB4.17KB▼ 6.02%
images/ui-bg_fine-grain_10_eceadf_60x60.png10.51KB1.42KB▼ 86.44%
images/ui-icons_3572ac_256x240.png4.44KB4.17KB▼ 6.02%
images/icon-wpmegm24x24.png1.61KB1.59KB▼ 0.97%