10% fleet

Code Review | Fleet Manager

WordPress plugin Fleet Manager scored10%from 54 tests.

About plugin

  • Plugin page: fleet
  • Plugin version: 2.1.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Sep 21, 2018
  • Latest release: Jun 30, 2023
  • Number of updates: 52
  • Update frequency: every 33.5 days
  • Top authors: iworks (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,145 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/fleet/includes/iworks/options/options.php+985
    Undefined index: options

Server metrics [RAM: ▲2.03MB] [CPU: ▲15.04ms] Passed 4 tests

A check of server-side resources used by Fleet Manager
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.44 ▲1.9856.28 ▲10.79
Dashboard /wp-admin5.35 ▲2.0567.34 ▲14.57
Posts /wp-admin/edit.php5.46 ▲2.1071.97 ▲22.55
Add New Post /wp-admin/post-new.php7.93 ▲2.04110.86 ▲12.23
Media Library /wp-admin/upload.php5.27 ▲2.0462.04 ▲24.45
Configuration /wp-admin/edit.php?post_type=iworks_fleet_person&page=iworks_fleet_index5.4269.70
Add New Person /wp-admin/post-new.php?post_type=iworks_fleet_person5.4168.98
Boats /wp-admin/edit.php?post_type=iworks_fleet_boat5.3252.87
Results /wp-admin/edit.php?post_type=iworks_fleet_result5.3252.40
Add New Boat /wp-admin/post-new.php?post_type=iworks_fleet_boat5.4973.16
Series /wp-admin/edit-tags.php?taxonomy=iworks_fleet_serie&post_type=iworks_fleet_person5.2651.15
Clubs /wp-admin/edit-tags.php?taxonomy=iworks_fleet_club&post_type=iworks_fleet_person5.2652.61
Boat Number /wp-admin/edit-tags.php?taxonomy=boat_number&post_type=attachment5.2648.97
Persons /wp-admin/edit.php?post_type=iworks_fleet_person5.3252.07
Locations /wp-admin/edit-tags.php?taxonomy=iworks_fleet_location&post_type=iworks_fleet_person5.2750.99

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 167 new files
Database: 2 new tables, 34 new options
New tables
wp_fleet_regatta_race
wp_fleet_regatta
New WordPress options
fleet_db_version
iworks_fleet_boat_show_owners
theysaidso_admin_options
iworks_fleet_results_show_points
iworks_fleet_result_show_english_title
iworks_fleet_person_show_articles_with_person_tag
iworks_fleet_boat_show_trophy
iworks_fleet_wide_class
iworks_fleet_results_show_trophy
can_compress_scripts
...

Browser metrics Passed 4 tests

Fleet Manager: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲13413.65 ▼0.731.61 ▼0.2938.77 ▼3.04
Dashboard /wp-admin2,275 ▲874.86 ▼0.03107.76 ▼9.0039.92 ▼5.09
Posts /wp-admin/edit.php2,158 ▲692.06 ▲0.0039.14 ▲1.3235.75 ▼1.35
Add New Post /wp-admin/post-new.php1,589 ▲5623.05 ▼0.22645.82 ▼58.5551.58 ▼7.24
Media Library /wp-admin/upload.php1,460 ▲754.23 ▲0.1198.45 ▼17.5145.41 ▼3.57
Configuration /wp-admin/edit.php?post_type=iworks_fleet_person&page=iworks_fleet_index2,3713.63108.2850.70
Add New Person /wp-admin/post-new.php?post_type=iworks_fleet_person3,1737.73194.4569.99
Boats /wp-admin/edit.php?post_type=iworks_fleet_boat1,1532.5036.5827.24
Results /wp-admin/edit.php?post_type=iworks_fleet_result1,2012.4941.3630.30
Add New Boat /wp-admin/post-new.php?post_type=iworks_fleet_boat4,7408.25203.5063.04
Series /wp-admin/edit-tags.php?taxonomy=iworks_fleet_serie&post_type=iworks_fleet_person1,3322.3634.3527.66
Clubs /wp-admin/edit-tags.php?taxonomy=iworks_fleet_club&post_type=iworks_fleet_person1,3292.5233.4328.32
Boat Number /wp-admin/edit-tags.php?taxonomy=boat_number&post_type=attachment1,3062.1325.6525.61
Persons /wp-admin/edit.php?post_type=iworks_fleet_person1,1612.5737.8827.23
Locations /wp-admin/edit-tags.php?taxonomy=iworks_fleet_location&post_type=iworks_fleet_person1,3572.5235.6228.23

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/fleet/includes/iworks/options/options.php+1002
    Undefined index: options
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_fleet_regatta_race
    • wp_fleet_regatta
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • fleet_db_version
    • can_compress_scripts

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 fix the following
  • 13× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_template_part() in wp-content/plugins/fleet/integration/themes/twentytwenty-5o5-child/taxonomy-iworks_fleet_serie.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fleet/integration/themes/twentytwenty-5o5-child/functions.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses_post() in wp-content/plugins/fleet/includes/iworks/rate/templates/widgets/donate.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_template_part() in wp-content/plugins/fleet/integration/themes/twentytwenty-5o5-child/taxonomy-iworks_fleet_boat_manufacturer.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_template_part() in wp-content/plugins/fleet/integration/themes/twentytwenty-5o5-child/archive-iworks_fleet_person.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_parse_args() in wp-content/plugins/fleet/includes/iworks/rate/rate.php:69
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/fleet/includes/iworks/rate/templates/plugins/og.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/fleet/includes/iworks/rate/templates/thanks.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses_post() in wp-content/plugins/fleet/includes/iworks/rate/templates/widgets/support.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_template_part() in wp-content/plugins/fleet/integration/themes/twentytwenty-5o5-child/archive-iworks_fleet_result.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: result, boat, fleet, sport, team...

fleet/fleet.php Passed 13 tests

The main PHP file in "Fleet Manager" ver. 2.1.5 adds more information about the plugin and also serves as the entry point for this plugin
92 characters long description:
The sailboat manager makes it possible to manage boats, sailors, regattas and their results.

Code Analysis 97% from 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 detected43,477 lines of code in 143 files:
LanguageFilesBlank linesComment linesLines of code
SVG921,8061330,054
PHP184141,7088,955
CSS1663541,789
PO File17719191,755
JavaScript1463154765
Sass180138
JSON10021

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 192)
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity134.11
▷ Minimum class complexity7.00
▷ Maximum class complexity387.00
Average method complexity5.56
▷ Minimum method complexity1.00
▷ Maximum method complexity192.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods263
▷ Static methods10.38%
▷ Public methods18670.72%
▷ Protected methods155.70%
▷ Private methods6223.57%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
13 PNG files occupy 0.14MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/iworks/options/assets/styles/images/ui-icons_ffffff_256x240.png3.54KB3.86KB0.00%
assets/externals/datepicker/css/images/ui-icons_444444_256x240.png6.83KB4.17KB▼ 38.86%
assets/externals/datepicker/css/images/ui-icons_777620_256x240.png4.44KB4.17KB▼ 6.02%
assets/externals/datepicker/css/images/ui-icons_cc0000_256x240.png4.44KB4.17KB▼ 6.02%
assets/externals/datepicker/css/images/ui-icons_777777_256x240.png6.83KB4.17KB▼ 38.92%