66% wp-travelermap

Code Review | wp-travelermap

WordPress plugin wp-travelermap scored66%from 54 tests.

About plugin

  • Plugin page: wp-travelermap
  • Plugin version: 1.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.0-3.9.1
  • WordPress version: 6.3.1
  • First release: Jun 29, 2014
  • Latest release: Jul 12, 2014
  • Number of updates: 10
  • Update frequency: every 1.3 days
  • Top authors: der_maddis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,843 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
Installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼12.14ms] Passed 4 tests

An overview of server-side resources used by wp-travelermap
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0340.33 ▲0.20
Dashboard /wp-admin3.57 ▲0.2250.15 ▼10.37
Posts /wp-admin/edit.php3.65 ▲0.2851.67 ▼2.71
Add New Post /wp-admin/post-new.php6.19 ▲0.2979.47 ▼35.66
Media Library /wp-admin/upload.php3.44 ▲0.2138.38 ▲5.92
Edit Map /wp-admin/admin.php?page=travelermap_editmap3.3432.23

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 771 new files
Database: 1 new table, 9 new options
New tables
wp_travelermap_maps
New WordPress options
db_upgraded
can_compress_scripts
travelermap_settings
travelermap_db_version
theysaidso_admin_options
widget_theysaidso_widget
travelermap_version
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for wp-travelermap
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,311 ▲56516.88 ▲2.4912.35 ▲10.5141.32 ▼2.92
Dashboard /wp-admin2,534 ▲3577.57 ▲2.02136.39 ▲44.2042.55 ▼1.58
Posts /wp-admin/edit.php2,462 ▲3654.35 ▲2.3658.65 ▲18.2131.83 ▼2.81
Add New Post /wp-admin/post-new.php1,618 ▲9223.66 ▲0.55662.09 ▲24.3435.87 ▼13.90
Media Library /wp-admin/upload.php1,600 ▲2005.77 ▲1.58105.69 ▲1.5843.03 ▼3.94
Edit Map /wp-admin/admin.php?page=travelermap_editmap3,7714.2255.6346.56

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=travelermap_editmap
    • > Notice in wp-content/plugins/wp-travelermap/admin/travelermap-editmap.php+60
    Undefined variable: map
    • > GET request to /wp-admin/admin.php?page=travelermap_editmap
    • > Notice in wp-content/plugins/wp-travelermap/admin/travelermap-editmap.php+60
    Trying to get property 'id' of non-object

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-travelermap/admin/travelermap-editmap.php
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_option() in wp-content/plugins/wp-travelermap/admin/travelermap-install.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-travelermap/admin/travelermap-ajax.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-travelermap/frontend/travelermap-frontend.php:25
    • > PHP Fatal error
      Uncaught Error: Call to a member function query() on null in wp-content/plugins/wp-travelermap/uninstall.php:31
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-travelermap/uninstall.php on line 29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-travelermap/admin/travelermap-upgrade.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-travelermap/includes/travelermap-leaflet.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-travelermap/admin/travelermap-admin.php:25

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=travelermap_editmap
    • > Rendering (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload,jquery-ui-core&ver=6.3.1 1 The specified value "!" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 97% 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
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Map List), #2 (Map Edit), #3 (Map Display)
You can take inspiration from this readme.txt

wp-travelermap/wp-travelermap.php Passed 13 tests

"wp-travelermap" version 1.4.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
55 characters long description:
A simple Plugin to create travel routes and manage maps

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected13,851 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript102,67388410,349
CSS81971172,397
PHP1188246558
SVG100504
Markdown114043

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
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%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
729 PNG files occupy 0.98MB with 0.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
media/mapsymbols/palace-2.png0.96KB0.60KB▼ 37.17%
media/mapsymbols/pyramid.png1.08KB0.88KB▼ 18.46%
media/mapsymbols/parkandride.png0.71KB0.49KB▼ 30.98%
media/mapsymbols/powerplant.png1.46KB1.22KB▼ 16.61%
media/mapsymbols/templehindu.png0.77KB0.52KB▼ 31.77%