77% moovin-delivery

Code Review | Moovin Delivery

WordPress plugin Moovin Delivery scored77%from 54 tests.

About plugin

  • Plugin page: moovin-delivery
  • Plugin version: 1.0.21
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.0
  • WordPress version: 6.3.1
  • First release: Jul 18, 2021
  • Latest release: Sep 8, 2022
  • Number of updates: 32
  • Update frequency: every 13.2 days
  • Top authors: javier4mar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,652 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.01MB] [CPU: ▼1.57ms] Passed 4 tests

A check of server-side resources used by Moovin Delivery
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.22 ▼3.73
Dashboard /wp-admin3.31 ▼0.0454.25 ▼6.93
Posts /wp-admin/edit.php3.36 ▲0.0052.20 ▲3.31
Add New Post /wp-admin/post-new.php5.89 ▲0.00101.31 ▲2.46
Media Library /wp-admin/upload.php3.23 ▲0.0037.08 ▲1.91

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 75 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Moovin Delivery: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲3914.31 ▼0.041.78 ▲0.1945.64 ▲4.25
Dashboard /wp-admin2,192 ▲155.51 ▼0.0285.71 ▼9.7840.24 ▼0.47
Posts /wp-admin/edit.php2,103 ▼01.95 ▼0.0642.86 ▲0.8536.86 ▼4.54
Add New Post /wp-admin/post-new.php1,526 ▼223.54 ▲0.47653.57 ▲7.2965.80 ▲4.44
Media Library /wp-admin/upload.php1,397 ▼34.18 ▼0.04101.33 ▼3.9851.70 ▲6.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • 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
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/moovin-delivery/admin/partials/moovin-delivery-admin-config.php
    • > /wp-content/plugins/moovin-delivery/admin/partials/moovin-delivery-admin-dashboard.php
    • > /wp-content/plugins/moovin-delivery/admin/partials/moovin-delivery-admin-display.php
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant MOOVIN_PLUGIN_URL - assumed 'MOOVIN_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/moovin-delivery/admin/partials/moovin-delivery-admin-orders.php on line 5
    • > PHP Warning
      Use of undefined constant MOOVIN_PLUGIN_URL - assumed 'MOOVIN_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/moovin-delivery/admin/partials/moovin-delivery-admin-config.php on line 272
    • > PHP Warning
      Use of undefined constant MOOVIN_PLUGIN_URL - assumed 'MOOVIN_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/moovin-delivery/admin/partials/moovin-delivery-admin-config.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_woocommerce_currency() in wp-content/plugins/moovin-delivery/admin/partials/moovin-delivery-admin-orders.php:20
    • > PHP Warning
      Use of undefined constant MOOVIN_PLUGIN_URL - assumed 'MOOVIN_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/moovin-delivery/admin/partials/moovin-delivery-admin-dashboard.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/moovin-delivery/public/partials/moovin-delivery-location-map-picker-public-display.php:24
    • > PHP Notice
      Undefined variable: address_type_section in wp-content/plugins/moovin-delivery/public/partials/moovin-delivery-location-customised-fields.php on line 3
    • > PHP Warning
      Use of undefined constant MOOVIN_PLUGIN_URL - assumed 'MOOVIN_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/moovin-delivery/admin/partials/moovin-delivery-admin-config.php on line 214
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/moovin-delivery/public/partials/moovin-delivery-location-customised-fields.php:4

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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 to be fixed:
  • Screenshots: Please describe screenshot #4 in moovin-delivery/assets to your readme.txt
  • Screenshots: Screenshot #6 (Notificaciones hacia los clientes cuando el paquete ya esta listo por recoger por Moovin con un link el seguimiento (Tracking) de su paquete screenshot-5.png.) image required
The official readme.txt is a good inspiration

moovin-delivery/moovin-delivery.php Passed 13 tests

"Moovin Delivery" version 1.0.21's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
116 characters long description:
Vos vendés nosotros entregamos tus paquetes, activa nuestro plugin y Moovin se encargara de entregar tus productos.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin51,318 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
CSS127,43315032,568
JavaScript1931727912,960
PHP181,1997005,790

PHP code 50% from 2 tests

This is a short overview 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 247)
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity75.89
▷ Minimum class complexity1.00
▷ Maximum class complexity353.00
Average method complexity8.17
▷ Minimum method complexity1.00
▷ Maximum method complexity247.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods94
▷ Static methods00.00%
▷ Public methods8994.68%
▷ Protected methods00.00%
▷ Private methods55.32%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
11 PNG files occupy 2.20MB with 1.58MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/icons/tik.png4.66KB2.53KB▼ 45.68%
assets/screenshot-3.png448.89KB107.03KB▼ 76.16%
assets/screenshot-4.png460.57KB134.87KB▼ 70.72%
assets/screenshot-5.png712.32KB232.72KB▼ 67.33%
(invalid) assets/images/ic_red_alert.png114.22KB0.00KB▼ 100.00%