94% gpxpress

Code Review | GPXpress

WordPress plugin GPXpress scored 94% from 54 tests.

About plugin

  • Plugin page: gpxpress
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 5.8.1
  • First release: Sep 28, 2012
  • Latest release: Oct 3, 2014
  • Number of updates: 11
  • Update frequency: every 66.8 days
  • Top authors: davidkeen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,948 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼144.34ms] Passed 4 tests

Analyzing server-side resources used by GPXpress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.1736.41 ▲17.64
Dashboard /wp-admin3.11 ▲0.0644.23 ▼3.36
Posts /wp-admin/edit.php3.17 ▲0.0637.92 ▼10.04
Add New Post /wp-admin/post-new.php5.47 ▲0.0485.16 ▼569.10
Media Library /wp-admin/upload.php3.06 ▲0.0638.49 ▲5.13
GPXpress /wp-admin/options-general.php?page=gpxpress3.0325.98

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, 1 new option
New WordPress options
gpxpress_options

Browser metrics Passed 4 tests

A check of browser resources used by GPXpress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,683 ▲8815.77 ▲0.317.52 ▼2.4246.93 ▼0.05
Dashboard /wp-admin2,975 ▲415.89 ▼0.04130.56 ▲3.38117.02 ▲6.78
Posts /wp-admin/edit.php2,744 ▲52.70 ▼0.0062.20 ▼4.6793.36 ▲1.91
Add New Post /wp-admin/post-new.php1,675 ▲17519.15 ▲0.57373.60 ▲25.34106.22 ▼5.70
Media Library /wp-admin/upload.php1,815 ▲85.04 ▲0.01147.06 ▼8.45109.71 ▼5.55
GPXpress /wp-admin/options-general.php?page=gpxpress1,0912.2252.6074.20

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/gpxpress/gpxpress.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (Example post with map.), #2 (Settings screen.)
You can take inspiration from this readme.txt

gpxpress/gpxpress.php Passed 13 tests

The entry point to "GPXpress" version 1.3 is a PHP file that has certain tags in its header comment area
35 characters long description:
Embed beautiful maps of GPX tracks.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected1,060 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
XML100832
PHP374186215
JavaScript12113

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity2.24
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1694.12%
▷ Protected methods00.00%
▷ Private methods15.88%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants225.00%
▷ Class constants675.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.26MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icons/motorcycle.png0.74KB0.48KB▼ 34.79%
icons/shadow.png1.58KB1.68KB0.00%
screenshot-1.png181.06KB73.38KB▼ 59.47%
icons/finish.png1.04KB0.75KB▼ 27.36%
screenshot-2.png77.79KB22.34KB▼ 71.28%