78% get-directions-from-mobile

Code Review | GEO-location and directions

WordPress plugin GEO-location and directions scored 78% from 54 tests.

About plugin

  • Plugin page: get-directions-fr...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5
  • WordPress version: 6.3.1
  • First release: Jun 12, 2013
  • Latest release: Jun 13, 2013
  • Number of updates: 21
  • Update frequency: every 0.1 days
  • Top authors: roycegracie (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 2,299 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
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.30ms] Passed 4 tests

This is a short check of server-side resources used by GEO-location and directions
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.72 ▲0.17
Dashboard /wp-admin3.32 ▲0.0254.29 ▲10.65
Posts /wp-admin/edit.php3.37 ▲0.0248.38 ▼0.68
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.83 ▼11.92
Media Library /wp-admin/upload.php3.24 ▲0.0133.63 ▼0.77

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for GEO-location and directions
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7313.22 ▼0.921.86 ▲0.1249.40 ▲7.44
Dashboard /wp-admin2,225 ▲375.85 ▲0.79103.13 ▼10.0938.85 ▲0.14
Posts /wp-admin/edit.php2,105 ▲161.98 ▼0.0436.44 ▼4.1231.33 ▼6.86
Add New Post /wp-admin/post-new.php1,553 ▲1123.39 ▲5.28657.82 ▲43.1754.09 ▲3.85
Media Library /wp-admin/upload.php1,398 ▲104.23 ▲0.0395.04 ▼5.9842.39 ▼2.13

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/get-directions-from-mobile/mobile-page.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/get-directions-from-mobile/geo-directions.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === get-directions-from-mobile === )
You can look at the official readme.txt

get-directions-from-mobile/geo-directions.php 92% from 13 tests

The main PHP script in "GEO-location and directions" version 0.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("get-directions-from-mobile.php" instead of "geo-directions.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
Good job! No executable or dangerous file extensions detected572 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS100392
PHP21824160
JavaScript36020

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
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
There were not PNG files found in your plugin