84% demomentsomtres-woocommerce-delivery

Code Review | DeMomentSomTres Woocommerce Delivery

WordPress plugin DeMomentSomTres Woocommerce Delivery scored84%from 54 tests.

About plugin

  • Plugin page: demomentsomtres-w...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.4.1
  • WordPress version: 6.3.1
  • First release: Jul 27, 2014
  • Latest release: Apr 20, 2015
  • Number of updates: 13
  • Update frequency: every 20.7 days
  • Top authors: marcqueralt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,129 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼5.60ms] Passed 4 tests

Server-side resources used by DeMomentSomTres Woocommerce Delivery
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1335.84 ▼2.37
Dashboard /wp-admin3.44 ▲0.1346.09 ▼2.97
Posts /wp-admin/edit.php3.55 ▲0.1945.61 ▼1.94
Add New Post /wp-admin/post-new.php6.02 ▲0.1383.41 ▼15.11
Media Library /wp-admin/upload.php3.36 ▲0.1334.78 ▲2.50

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by DeMomentSomTres Woocommerce Delivery
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.34 ▼0.251.63 ▲0.1040.67 ▲1.63
Dashboard /wp-admin2,203 ▲325.51 ▼0.0683.36 ▼6.4738.26 ▼6.71
Posts /wp-admin/edit.php2,112 ▲121.95 ▼0.0536.01 ▼2.0835.07 ▲1.06
Add New Post /wp-admin/post-new.php1,539 ▲223.06 ▲4.97678.70 ▲50.2051.11 ▼17.47
Media Library /wp-admin/upload.php1,411 ▲144.21 ▼0.04102.11 ▲7.6446.55 ▲6.70

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/demomentsomtres-woocommerce-delivery/demomentsomtres-WC-delivery-custom.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: delivery, delivery date, woocommerce

demomentsomtres-woocommerce-delivery/demomentsomtres-WC-delivery-custom.php 85% from 13 tests

This is the main PHP file of "DeMomentSomTres Woocommerce Delivery" version 1.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("demomentsomtres-woocommerce-delivery.php" instead of "demomentsomtres-WC-delivery-custom.php")
  • Requires at least: The required version number must match the one declared in readme.txt ("3.9.1" instead of "3.9")

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
Success! There were no dangerous files found in this plugin920 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP149127622
PO File2130264298

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity51.00
▷ Minimum class complexity51.00
▷ Maximum class complexity51.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods32
▷ Static methods00.00%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants30
▷ Global constants13.33%
▷ Class constants2996.67%
▷ Public constants29100.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
There are no PNG files in this plugin