93% trail-passion

Code Review | Trail-Passion

WordPress plugin Trail-Passion scored 93% from 54 tests.

About plugin

  • Plugin page: trail-passion
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-4.0.1
  • WordPress version: 5.8.1
  • First release: Dec 12, 2014
  • Latest release: Dec 13, 2014
  • Number of updates: 12
  • Update frequency: every 0.2 days
  • Top authors: trail-passion.net (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 945 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼139.78ms] Passed 4 tests

Analyzing server-side resources used by Trail-Passion
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0134.18 ▲0.45
Dashboard /wp-admin3.06 ▲0.0145.10 ▲9.12
Posts /wp-admin/edit.php3.11 ▲0.0138.91 ▼2.62
Add New Post /wp-admin/post-new.php5.42 ▼0.0192.86 ▼559.97
Media Library /wp-admin/upload.php3.01 ▲0.0032.27 ▲3.04

Server storage [IO: ▲0.09MB] [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: 28 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Trail-Passion
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,685 ▲9015.86 ▲0.248.57 ▼2.1046.14 ▼3.51
Dashboard /wp-admin2,972 ▲415.92 ▼0.13135.47 ▼11.28110.17 ▼7.99
Posts /wp-admin/edit.php2,741 ▲52.72 ▲0.0266.41 ▲3.2687.73 ▼1.38
Add New Post /wp-admin/post-new.php1,685 ▲7018.22 ▼3.13415.08 ▲143.36118.03 ▲16.96
Media Library /wp-admin/upload.php1,815 ▲85.02 ▲0.01140.81 ▼2.53117.81 ▲3.73

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
Almost there! Just fix the following items
  • 15× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function execService() in wp-content/plugins/trail-passion/trunk/tfw/svc.php:102
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/trail-passion/trunk/trail-passion.php:84
    • > PHP Warning
      include(svc/.php): failed to open stream: No such file or directory in wp-content/plugins/trail-passion/trunk/tfw/svc.php on line 95
    • > PHP Warning
      include(): Failed opening 'svc/.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/trail-passion/trunk/tfw/svc.php on line 95
    • > PHP Warning
      include_once(../../../../wp-config.php): failed to open stream: No such file or directory in /var/www/wordpress/wp-content/plugins/trail-passion/trunk/tfw/db.inc on line 17
    • > PHP Notice
      Undefined variable: table_prefix in /var/www/wordpress/wp-content/plugins/trail-passion/trunk/tfw/db.inc on line 23
    • > PHP Warning
      include_once(): Failed opening '../../../../wp-config.php' for inclusion (include_path='.:/usr/share/php') in /var/www/wordpress/wp-content/plugins/trail-passion/trunk/tfw/db.inc on line 17
    • > PHP Notice
      Undefined index: i in wp-content/plugins/trail-passion/trunk/tfw/svc.php on line 63
    • > PHP Warning
      Use of undefined constant DB_USER - assumed 'DB_USER' (this will throw an Error in a future version of PHP) in /var/www/wordpress/wp-content/plugins/trail-passion/trunk/tfw/db.inc on line 21
    • > PHP Warning
      Use of undefined constant DB_HOST - assumed 'DB_HOST' (this will throw an Error in a future version of PHP) in /var/www/wordpress/wp-content/plugins/trail-passion/trunk/tfw/db.inc on line 19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === trail-passion === )
  • Donate link: Invalid url: ""
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can look at the official readme.txt

trail-passion/trail-passion.php Passed 13 tests

The main file in "Trail-Passion" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
72 characters long description:
Embed high quality maps in wordpress with elevation graphs and 3D views.

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
No dangerous file extensions were detected824 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP44497304
JavaScript12632214
SVG100166
CSS1250140

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
12 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
fly.png0.87KB0.86KB▼ 1.23%
follow.png2.61KB1.87KB▼ 28.60%
trunk/fly.png0.87KB0.86KB▼ 1.23%
trunk/trail-passion.png1.06KB1.27KB0.00%
trunk/follow.png2.61KB1.87KB▼ 28.60%