10% meest-for-woocommerce

Code Review | MeestForWooCommerce

WordPress plugin MeestForWooCommerce scored10%from 54 tests.

About plugin

  • Plugin page: meest-for-woocomm...
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 7.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Apr 28, 2021
  • Latest release: Aug 7, 2023
  • Number of updates: 12
  • Update frequency: every 69.3 days
  • Top authors: meest (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /821 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/meest-for-woocommerce/meest_shipping.php+41
    require_once(wp-content/plugins/woocommerce/woocommerce.php): failed to open stream: No such file or directory

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

Analyzing server-side resources used by MeestForWooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.04 ▼3.28
Dashboard /wp-admin3.31 ▼0.0447.38 ▼13.84
Posts /wp-admin/edit.php3.36 ▲0.0047.46 ▼2.24
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.64 ▼7.63
Media Library /wp-admin/upload.php3.23 ▲0.0033.07 ▼1.45

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 244 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

MeestForWooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.80 ▲0.431.71 ▼0.3538.92 ▲0.52
Dashboard /wp-admin2,206 ▲155.86 ▲0.93107.76 ▼8.6742.44 ▲0.72
Posts /wp-admin/edit.php2,092 ▲242.12 ▲0.0640.58 ▲4.5033.62 ▼0.73
Add New Post /wp-admin/post-new.php1,528 ▼523.32 ▲0.34595.89 ▼91.3650.58 ▼5.61
Media Library /wp-admin/upload.php1,388 ▼04.20 ▼0.0298.50 ▼7.8341.32 ▼0.59

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/meest-for-woocommerce/uninstall.php+8
    Use of undefined constant MEEST_PLUGIN_NAME - assumed 'MEEST_PLUGIN_NAME' (this will throw an Error in a future version of PHP)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 51× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: parcel in wp-content/plugins/meest-for-woocommerce/resources/views/pages/parcel_form.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'MeestShipping\\Core\\Controller' not found in wp-content/plugins/meest-for-woocommerce/src/Controllers/SettingController.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'MeestShipping\\Core\\Resource' not found in wp-content/plugins/meest-for-woocommerce/src/Resources/PickupApiResource.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/meest-for-woocommerce/resources/views/pages/parcel_list.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'MeestShipping\\Core\\Resource' not found in wp-content/plugins/meest-for-woocommerce/src/Resources/ParcelApiResource.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'MeestShipping\\Contracts\\Module' not found in wp-content/plugins/meest-for-woocommerce/src/Modules/Option.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'MeestShipping\\Core\\Resource' not found in wp-content/plugins/meest-for-woocommerce/src/Resources/CostApiResource.php:6
    • > PHP Notice
      Trying to get property 'id' of non-object in wp-content/plugins/meest-for-woocommerce/resources/views/pages/pickup_form.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'MeestShipping\\Repositories\\Repository' not found in wp-content/plugins/meest-for-woocommerce/src/Repositories/PackTypesRepository.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'MeestShipping\\Core\\Table' not found in wp-content/plugins/meest-for-woocommerce/src/Tables/ParcelTable.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
10 plugin tags: delivery, shop, meest-express, courier, post...

meest-for-woocommerce/meest_shipping.php 85% from 13 tests

This is the main PHP file of "MeestForWooCommerce" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("meest-for-woocommerce.php" instead of "meest_shipping.php")
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.1" instead of "7.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected20,551 lines of code in 234 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript134316167,688
CSS1112026,297
PHP859282815,909
PO File23074640
JSON20017

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity7.22
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces13
Interfaces1
Traits3
Classes60
▷ Abstract classes58.33%
▷ Concrete classes5591.67%
▷ Final classes00.00%
Methods272
▷ Static methods5821.32%
▷ Public methods24288.97%
▷ Protected methods10.37%
▷ Private methods2910.66%
Functions21
▷ Named functions733.33%
▷ Anonymous functions1466.67%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/icon_big.png7.92KB2.19KB▼ 72.32%
public/img/logo.png8.15KB3.87KB▼ 52.56%
public/img/icon.png3.29KB0.49KB▼ 85.27%