84% traveledmap-trip-itinerary-embedded-map

Code Review | TraveledMap Trip itinerary: Embedded map

WordPress plugin TraveledMap Trip itinerary: Embedded map scored84%from 54 tests.

About plugin

  • Plugin page: traveledmap-trip-...
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8.2
  • WordPress version: 6.3.1
  • First release: Aug 8, 2019
  • Latest release: Nov 27, 2021
  • Number of updates: 40
  • Update frequency: every 21.3 days
  • Top authors: traveledmap (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

80+ active /2,054 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.23MB] [CPU: ▼9.53ms] Passed 4 tests

Server-side resources used by TraveledMap Trip itinerary: Embedded map
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0540.17 ▼2.00
Dashboard /wp-admin3.34 ▲0.0345.67 ▼2.63
Posts /wp-admin/edit.php3.39 ▲0.0346.00 ▲1.61
Add New Post /wp-admin/post-new.php4.88 ▼1.0157.13 ▼34.87
Media Library /wp-admin/upload.php3.26 ▲0.0334.14 ▲1.39

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

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

Browser metrics Passed 4 tests

Checking browser requirements for TraveledMap Trip itinerary: Embedded map
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲7513.22 ▼1.534.39 ▲2.3143.64 ▼1.41
Dashboard /wp-admin2,209 ▲185.79 ▲0.7294.03 ▼13.4541.79 ▼4.25
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0435.63 ▲0.5535.94 ▼1.51
Add New Post /wp-admin/post-new.php6,304 ▲4,77619.27 ▼3.89877.58 ▲200.2764.06 ▲9.41
Media Library /wp-admin/upload.php1,382 ▼64.21 ▼0.0194.78 ▼8.0342.56 ▼1.75

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
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_traveledmap_trip_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/traveledmap-trip-itinerary-embedded-map/src/widget/shortcode.php:47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/traveledmap-trip-itinerary-embedded-map/src/metabox/metabox.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/traveledmap-trip-itinerary-embedded-map/src/widget/widget.php:3

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

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: map, embed, pictures, blog, traveledmap...

traveledmap-trip-itinerary-embedded-map/plugin.php 92% from 13 tests

The main PHP file in "TraveledMap Trip itinerary: Embedded map" ver. 1.1.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("traveledmap-trip-itinerary-embedded-map.php" instead of "plugin.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
No dangerous file extensions were detected1,691 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP912443786
JavaScript52834377
JSON200207
Sass2491176
Markdown1120143
CSS2002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity21.00
▷ Minimum class complexity8.00
▷ Maximum class complexity34.00
Average method complexity4.08
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods861.54%
▷ Public methods1076.92%
▷ Protected methods00.00%
▷ Private methods323.08%
Functions10
▷ Named functions990.00%
▷ Anonymous functions110.00%
Constants6
▷ Global constants350.00%
▷ Class constants350.00%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 PNG files occupy 2.55MB with 1.62MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/metabox.png9.11KB3.71KB▼ 59.27%
assets/banner-772x250.png156.64KB54.81KB▼ 65.01%
assets/example-2.png995.85KB406.81KB▼ 59.15%
assets/example-1.png740.13KB236.87KB▼ 68.00%
assets/widget-config.png61.42KB20.64KB▼ 66.39%