74% takemethere

Code Review | TakeMeThere

WordPress plugin TakeMeThere scored74%from 54 tests.

About plugin

  • Plugin page: takemethere
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7
  • WordPress version: 6.3.1
  • First release: Jan 8, 2017
  • Latest release: Jan 12, 2017
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: aviket (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /441 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼1.94MB] [CPU: ▼63.63ms] Passed 4 tests

Analyzing server-side resources used by TakeMeThere
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.415.61 ▼47.12
Dashboard /wp-admin2.08 ▼1.276.21 ▼59.62
Posts /wp-admin/edit.php2.08 ▼1.286.54 ▼51.58
Add New Post /wp-admin/post-new.php2.08 ▼3.818.44 ▼96.20
Media Library /wp-admin/upload.php2.08 ▼1.166.09 ▼30.45

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for TakeMeThere
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,892 ▲13115.07 ▲1.058.87 ▲6.7143.08 ▲0.48
Dashboard /wp-admin2,197 ▲205.69 ▲0.0485.52 ▼6.5240.30 ▼1.87
Posts /wp-admin/edit.php2,108 ▲52.76 ▲0.7538.90 ▼3.3036.65 ▲2.35
Add New Post /wp-admin/post-new.php1,540 ▲318.31 ▼0.03640.69 ▲5.1757.96 ▼23.09
Media Library /wp-admin/upload.php1,411 ▲145.25 ▲1.03102.97 ▼5.3543.90 ▲0.74

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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 fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/takemethere/takemethere.php:11

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 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
3 plugin tags: map, gis, leaflet

takemethere/takemethere.php Passed 13 tests

The main PHP file in "TakeMeThere" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
86 characters long description:
Plugin Based on leaflet.js and nominatim openstreetmap API for locating a place on MAP

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected8,347 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript32,6413,2077,412
CSS312144887
PHP116848

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/leaflet/images/marker-shadow.png0.60KB1.16KB0.00%
js/leaflet/images/marker-icon.png1.43KB1.55KB0.00%
js/leaflet/images/layers-2x.png1.23KB1.67KB0.00%
js/leaflet/images/layers.png0.68KB1.05KB0.00%
js/leaflet/images/marker-icon-2x.png2.53KB2.52KB0.39%