84% demomentsomtres-wc-minimum-purchase-message

Code Review | DeMomentSomTres Woocommerce Minimum Purchase Message

WordPress plugin DeMomentSomTres Woocommerce Minimum Purchase Message scored84%from 54 tests.

About plugin

  • Plugin page: demomentsomtres-w...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.1
  • WordPress version: 6.3.1
  • First release: Feb 2, 2015
  • Latest release: Feb 2, 2015
  • Number of updates: 2
  • Update frequency: every 45.0 days
  • Top authors: marcqueralt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /716 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.19ms] Passed 4 tests

Server-side resources used by DeMomentSomTres Woocommerce Minimum Purchase Message
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0347.25 ▲0.45
Dashboard /wp-admin3.33 ▲0.0351.23 ▼2.13
Posts /wp-admin/edit.php3.38 ▲0.0355.62 ▲4.84
Add New Post /wp-admin/post-new.php5.91 ▲0.0396.64 ▼6.11
Media Library /wp-admin/upload.php3.26 ▲0.0338.32 ▲3.03

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

DeMomentSomTres Woocommerce Minimum Purchase Message: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.58 ▲0.201.63 ▼0.0041.32 ▼2.87
Dashboard /wp-admin2,209 ▲295.63 ▼0.0591.62 ▼7.8543.02 ▲2.93
Posts /wp-admin/edit.php2,112 ▲92.00 ▼0.0140.38 ▲2.3937.45 ▼0.42
Add New Post /wp-admin/post-new.php1,537 ▲1123.26 ▼0.34631.33 ▼49.1555.65 ▼3.55
Media Library /wp-admin/upload.php1,411 ▲114.19 ▼0.1595.40 ▼8.2741.85 ▼5.31

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • 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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/demomentsomtres-wc-minimum-purchase-message/demomentsomtres-WC-minimum-purchase-message.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 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
3 plugin tags: delivery, woocommerce, delivery date

demomentsomtres-wc-minimum-purchase-message/demomentsomtres-WC-minimum-purchase-message.php 85% from 13 tests

This is the main PHP file of "DeMomentSomTres Woocommerce Minimum Purchase Message" version 0.1, 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: The principal plugin file should be the same as the plugin slug ("demomentsomtres-wc-minimum-purchase-message.php" instead of "demomentsomtres-WC-minimum-purchase-message.php")
  • Requires at least: Required version must be the same as 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 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin225 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP12553127
PO File2285698

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.18
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants112.50%
▷ Class constants787.50%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin