62% tripplan

Code Review | Trip Plan

WordPress plugin Trip Plan scored62%from 54 tests.

About plugin

  • Plugin page: tripplan
  • Plugin version: 1.0.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.2.3
  • WordPress version: 6.3.1
  • First release: Oct 4, 2017
  • Latest release: Dec 17, 2019
  • Number of updates: 29
  • Update frequency: every 27.9 days
  • Top authors: checklistcom (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /3,314 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.83MB] [CPU: ▼32.26ms] Passed 4 tests

A check of server-side resources used by Trip Plan
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1238.39 ▼5.46
Dashboard /wp-admin3.11 ▼0.2023.68 ▼24.05
Posts /wp-admin/edit.php3.11 ▼0.2526.20 ▼20.57
Add New Post /wp-admin/post-new.php3.11 ▼2.7823.20 ▼74.28
Media Library /wp-admin/upload.php3.11 ▼0.1223.47 ▼10.12
Settings /wp-admin/admin.php?page=tripplan_settings3.1123.86

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
tripplan_settings
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Trip Plan: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲6813.53 ▼0.861.69 ▼0.1644.52 ▲5.62
Dashboard /wp-admin2,242 ▲605.03 ▼0.8299.12 ▼2.0298.88 ▲55.52
Posts /wp-admin/edit.php2,133 ▲412.30 ▲0.2440.28 ▼3.5135.15 ▼1.58
Add New Post /wp-admin/post-new.php1,704 ▲16022.80 ▲4.57762.72 ▲164.1537.87 ▼13.86
Media Library /wp-admin/upload.php1,418 ▲334.34 ▲0.17102.92 ▼1.6772.02 ▲30.64
Settings /wp-admin/admin.php?page=tripplan_settings1,8012.4772.7429.51

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • tripplan_settings
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=tripplan_settings
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

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
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/tripplan/images/checklist-icon.php
    • > /wp-content/plugins/tripplan/tripplan-com.php
    • > /wp-content/plugins/tripplan/images/ic_print_white_24px.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined index: fill in wp-content/plugins/tripplan/images/checklist-icon.php on line 3
    • > PHP Notice
      Undefined index: fill in wp-content/plugins/tripplan/images/ic_print_white_24px.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/tripplan/includes/tripplan-settings.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: travel, trip, google map, map, maps

tripplan/tripplan-com.php 85% from 13 tests

The main PHP file in "Trip Plan" ver. 1.0.10 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("tripplan.php" instead of "tripplan-com.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,287 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP410670629
JavaScript35836519
CSS3128135
SVG1004

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity26.00
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity2.79
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods29
▷ Static methods827.59%
▷ Public methods2793.10%
▷ Protected methods00.00%
▷ Private methods26.90%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/red.png1.27KB1.04KB▼ 18.77%
images/icon-white-16.png0.89KB0.39KB▼ 56.24%