83% wp-trip-summary

Code Review | WP Trip Summary

WordPress plugin WP Trip Summary scored 83% from 54 tests.

About plugin

  • Plugin page: wp-trip-summary
  • Plugin version: 0.2.8
  • PHP compatiblity: 7.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 10, 2019
  • Latest release: Dec 1, 2022
  • Number of updates: 14
  • Update frequency: every 80.0 days
  • Top authors: alexandruboia (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

20+ active / 1,551 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲1.30MB] [CPU: ▼7.56ms] Passed 4 tests

Analyzing server-side resources used by WP Trip Summary
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.55 ▲2.0952.48 ▲8.19
Dashboard /wp-admin5.38 ▲2.0860.46 ▲7.10
Posts /wp-admin/edit.php5.98 ▲2.6277.02 ▲28.07
Add New Post /wp-admin/post-new.php4.86 ▼1.0337.48 ▼73.61
Media Library /wp-admin/upload.php5.30 ▲2.0760.63 ▲30.09
About /wp-admin/admin.php?page=abp01-trip-summary-about5.3350.34
Maintenance /wp-admin/admin.php?page=abp01-trip-summary-maintenance5.3750.13
Settings /wp-admin/admin.php?page=abp01-trip-summary-settings5.5048.27
Help /wp-admin/admin.php?page=abp01-trip-summary-help5.5550.50
Lookup data management /wp-admin/admin.php?page=abp01-trip-summary-lookup5.4046.35

Server storage [IO: ▲8.14MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 457 new files
Database: 5 new tables, 8 new options
New tables
wp_abp01_techbox_route_details_lookup
wp_abp01_techbox_route_details
wp_abp01_techbox_route_track
wp_abp01_techbox_lookup
wp_abp01_techbox_lookup_lang
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
abp01.option.version
abp01.option.changeLogCache
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by WP Trip Summary
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲10013.32 ▼0.984.04 ▲2.3038.77 ▼10.76
Dashboard /wp-admin2,238 ▲534.85 ▼1.16112.81 ▲14.3538.98 ▼4.83
Posts /wp-admin/edit.php2,191 ▲993.03 ▲0.9751.97 ▲11.6833.96 ▼1.26
Add New Post /wp-admin/post-new.php1,866 ▲33318.73 ▼4.35751.64 ▲131.4650.42 ▼2.13
Media Library /wp-admin/upload.php1,426 ▲354.21 ▲0.0298.34 ▲0.0540.80 ▼6.33
About /wp-admin/admin.php?page=abp01-trip-summary-about1,4312.0223.8329.61
Maintenance /wp-admin/admin.php?page=abp01-trip-summary-maintenance9172.8730.3523.54
Settings /wp-admin/admin.php?page=abp01-trip-summary-settings1,5703.6250.2246.96
Help /wp-admin/admin.php?page=abp01-trip-summary-help2,2793.1032.0279.20
Lookup data management /wp-admin/admin.php?page=abp01-trip-summary-lookup1,8653.2962.1830.60

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Abp01_Exception' not found in wp-content/plugins/wp-trip-summary/lib/pluginModules/Exception.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: trip, summary, gpx, map, travel

wp-trip-summary/abp01-plugin-main.php 85% from 13 tests

The main PHP file in "WP Trip Summary" ver. 0.2.8 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-trip-summary.php" instead of "abp01-plugin-main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected80,659 lines of code in 338 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript11313,22911,27957,487
PHP1863,6368,82215,768
CSS305355704,065
HTML4001,758
PO File25296471,305
SVG111145
XML170126
Markdown1405

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity10.49
▷ Minimum class complexity1.00
▷ Maximum class complexity221.00
Average method complexity1.98
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces23
Traits0
Classes128
▷ Abstract classes32.34%
▷ Concrete classes12597.66%
▷ Final classes00.00%
Methods1,517
▷ Static methods1066.99%
▷ Public methods93461.57%
▷ Protected methods563.69%
▷ Private methods52734.74%
Functions89
▷ Named functions6269.66%
▷ Anonymous functions2730.34%
Constants266
▷ Global constants4416.54%
▷ Class constants22283.46%
▷ Public constants222100.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
65 PNG files occupy 3.65MB with 1.79MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
media/img/logo.png57.52KB21.04KB▼ 63.41%
data/help/ro_RO/screenshots/viewer-map-alt-profile.png268.01KB135.04KB▼ 49.61%
data/help/en_US/screenshots/maintenance.png19.02KB6.21KB▼ 67.36%
data/help/default/screenshots/admin-edit-launcher-block.png9.83KB5.07KB▼ 48.47%
media/js/abp01-classic-editor-shortcode/button.png1.11KB0.94KB▼ 15.96%