77% fleetwire-fleet-management

Code Review | Fleetwire Fleet Management Plugin

WordPress plugin Fleetwire Fleet Management Plugin scored77%from 54 tests.

About plugin

  • Plugin page: fleetwire-fleet-m...
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 10, 2021
  • Latest release: Mar 20, 2023
  • Number of updates: 13
  • Update frequency: every 38.1 days
  • Top authors: fleetwire (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /1,528 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.87ms] Passed 4 tests

This is a short check of server-side resources used by Fleetwire Fleet Management Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.50 ▲1.72
Dashboard /wp-admin3.36 ▲0.0643.59 ▼3.95
Posts /wp-admin/edit.php3.47 ▲0.1248.94 ▲4.37
Add New Post /wp-admin/post-new.php5.94 ▲0.0578.81 ▼14.18
Media Library /wp-admin/upload.php3.28 ▲0.0532.07 ▼3.07
Fleetwire /wp-admin/options-general.php?page=Fleetwire3.2631.20

Server storage [IO: ▲6.72MB] [DB: ▲0.31MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Fleetwire Fleet Management Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲6814.77 ▲0.381.77 ▼0.0142.63 ▲0.94
Dashboard /wp-admin2,213 ▲254.87 ▼0.0198.98 ▼5.6037.52 ▼3.86
Posts /wp-admin/edit.php2,096 ▲72.04 ▼0.0141.17 ▲5.7235.37 ▲3.83
Add New Post /wp-admin/post-new.php1,520 ▼417.51 ▼5.58647.59 ▲23.8757.82 ▼2.58
Media Library /wp-admin/upload.php1,395 ▲74.24 ▼0.0192.95 ▼0.2640.63 ▼1.25
Fleetwire /wp-admin/options-general.php?page=Fleetwire9592.0426.9431.37

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% 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 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 fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/fleetwire-fleet-management/admin/fleetwire_notice.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/fleetwire-fleet-management/admin/fleetwire_admin.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === fleetwire-fleet-management === )
You can look at the official readme.txt

fleetwire-fleet-management/fleetwire.php 85% from 13 tests

The entry point to "Fleetwire Fleet Management Plugin" version 1.0.9 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("fleetwire-fleet-management.php" instead of "fleetwire.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 146 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected490 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP47776348
Bourne Shell13945115
CSS19027

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.06
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%
Functions33
▷ Named functions3296.97%
▷ Anonymous functions13.03%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
10 PNG files occupy 6.70MB with 4.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png908.75KB247.40KB▼ 72.78%
assets/banner-772x250.png16.83KB6.76KB▼ 59.82%
assets/screenshot-4.png931.29KB251.39KB▼ 73.01%
assets/screenshot-2.png824.16KB211.68KB▼ 74.32%
assets/FleetWire_Logo-B.png7.28KB4.62KB▼ 36.51%