10% flower-delivery-by-florist-one

Code Review | Flower Delivery by Florist One

WordPress plugin Flower Delivery by Florist One scored10%from 54 tests.

About plugin

  • Plugin page: flower-delivery-b...
  • Plugin version: 3.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.2
  • WordPress version: 6.3.1
  • First release: Aug 18, 2016
  • Latest release: Apr 29, 2023
  • Number of updates: 117
  • Update frequency: every 20.9 days
  • Top authors: floristone (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /6,584 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/flower-delivery-by-florist-one/public/flower-delivery.php+16
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.20MB] [CPU: ▼12.49ms] Passed 4 tests

An overview of server-side resources used by Flower Delivery by Florist One
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2241.96 ▲2.85
Dashboard /wp-admin3.51 ▲0.1750.95 ▼16.01
Posts /wp-admin/edit.php3.63 ▲0.2745.75 ▼5.12
Add New Post /wp-admin/post-new.php6.11 ▲0.2385.53 ▼26.91
Media Library /wp-admin/upload.php3.44 ▲0.2136.02 ▼1.90

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 44 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
florist-one-flower-delivery
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Flower Delivery by Florist One
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,992 ▲24614.32 ▼0.0321.25 ▲19.4246.08 ▲4.98
Dashboard /wp-admin2,228 ▲475.99 ▲0.3787.41 ▼17.5942.32 ▼2.21
Posts /wp-admin/edit.php2,117 ▲172.35 ▲0.3737.30 ▼0.1136.43 ▼0.04
Add New Post /wp-admin/post-new.php1,559 ▲3323.25 ▼0.21674.19 ▼40.1337.57 ▼14.69
Media Library /wp-admin/upload.php1,437 ▲344.34 ▲0.2396.47 ▼12.5143.03 ▼3.83

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • florist-one-flower-delivery
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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
Please take a closer look at the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/flower-delivery-by-florist-one/public/partials/recipient-state-list.php
    • > /wp-content/plugins/flower-delivery-by-florist-one/public/partials/florist-one-flower-delivery-cart-body.php
  • 213× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: autopop in wp-content/plugins/flower-delivery-by-florist-one/public/partials/recipient-state-list.php on line 11
    • > PHP Notice
      Undefined variable: autopop in wp-content/plugins/flower-delivery-by-florist-one/public/partials/recipient-state-list.php on line 43
    • > PHP Notice
      Undefined variable: _SESSION in wp-content/plugins/flower-delivery-by-florist-one/public/partials/recipient-state-list.php on line 30
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/flower-delivery-by-florist-one/public/partials/recipient-state-list.php on line 32
    • > PHP Notice
      Undefined variable: autopop in wp-content/plugins/flower-delivery-by-florist-one/public/partials/recipient-state-list.php on line 45
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/flower-delivery-by-florist-one/public/partials/recipient-state-list.php on line 49
    • > PHP Notice
      Undefined variable: autopop in wp-content/plugins/flower-delivery-by-florist-one/public/partials/recipient-state-list.php on line 21
    • > PHP Notice
      Undefined variable: _SESSION in wp-content/plugins/flower-delivery-by-florist-one/public/partials/recipient-state-list.php on line 8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/flower-delivery-by-florist-one/public/partials/recipient-state-list.php on line 67
    • > PHP Notice
      Undefined variable: autopop in wp-content/plugins/flower-delivery-by-florist-one/public/partials/recipient-state-list.php on line 61

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 Passed 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
9 plugin tags: flower delivery, flower shop, flowershop, florist, affiliate program...

flower-delivery-by-florist-one/florist-one-flower-delivery.php 85% from 13 tests

The main PHP script in "Flower Delivery by Florist One" version 3.7 is automatically included on every request by WordPress
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("flower-delivery-by-florist-one.php" instead of "florist-one-flower-delivery.php")

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 detected15,038 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
CSS468609,490
PHP284476012,985
JavaScript74861802,563

PHP code Passed 2 tests

A short 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.56
Average class complexity5.43
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2379.31%
▷ Protected methods00.00%
▷ Private methods620.69%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin