68% motordesk

Code Review | MotorDesk

WordPress plugin MotorDesk scored68%from 54 tests.

About plugin

  • Plugin page: motordesk
  • Plugin version: 1.0.9
  • PHP compatiblity: 6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-6.4
  • WordPress version: 6.3.1
  • First release: Sep 14, 2022
  • Latest release: Oct 25, 2023
  • Number of updates: 34
  • Update frequency: every 12.0 days
  • Top authors: motordesk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /385 total downloads

Benchmarks

Plugin footprint 65% 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: ▲0.04MB] [CPU: ▼2.96ms] Passed 4 tests

An overview of server-side resources used by MotorDesk
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0336.64 ▼0.61
Dashboard /wp-admin3.35 ▲0.0443.36 ▼5.10
Posts /wp-admin/edit.php3.40 ▲0.0447.14 ▲0.91
Add New Post /wp-admin/post-new.php5.93 ▲0.0481.82 ▼6.44
Media Library /wp-admin/upload.php3.27 ▲0.0433.50 ▲0.30

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

MotorDesk: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.16 ▼0.191.54 ▼0.0236.04 ▼5.04
Dashboard /wp-admin2,207 ▲275.51 ▼0.1483.27 ▼5.2936.66 ▼1.48
Posts /wp-admin/edit.php2,112 ▲122.00 ▲0.0035.06 ▼0.9029.84 ▼2.68
Add New Post /wp-admin/post-new.php1,536 ▲423.29 ▲0.59690.32 ▲44.2565.51 ▲17.61
Media Library /wp-admin/upload.php1,406 ▲34.23 ▼0.0393.98 ▼0.9240.30 ▼3.63

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/motordesk/uninstall.php+29
    Undefined variable: index_keys
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/motordesk/template/motordesk_vehicle_template_search_form.php
    • > /wp-content/plugins/motordesk/template/motordesk_vehicle_template_latest.php
    • > /wp-content/plugins/motordesk/template/motordesk_vehicle_template_search_embed.php
    • > /wp-content/plugins/motordesk/template/motordesk_vehicle_template_search.php
  • 327× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/motordesk/template/motordesk_vehicle_template_search_form.php on line 116
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/motordesk/template/motordesk_vehicle_template_search_form.php on line 123
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/motordesk/template/motordesk_vehicle_template_search_form.php on line 9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/motordesk/template/motordesk_vehicle_template_search_form.php on line 81
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/motordesk/template/motordesk_vehicle_template_search_form.php on line 39
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/motordesk/template/motordesk_vehicle_template_search_form.php on line 39
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/motordesk/template/motordesk_vehicle_template_search_form.php on line 88
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/motordesk/template/motordesk_vehicle_template_search_form.php on line 81
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/motordesk/template/motordesk_vehicle_template_search_form.php on line 137
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/motordesk/template/motordesk_vehicle_template_search_form.php on line 55

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There were no tags found
Please take inspiration from this readme.txt

motordesk/motordesk.php 92% from 13 tests

Analyzing the main PHP file in "MotorDesk" version 1.0.9
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 230 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected1,843 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP159241941,726
CSS117182
JavaScript115335

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
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 functions33100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG files were detected