10% florahome

Code Review | Flora@home plugin

WordPress plugin Flora@home plugin scored10%from 54 tests.

About plugin

  • Plugin page: florahome
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2.2
  • WordPress version: 6.3.1
  • First release: Jun 15, 2018
  • Latest release: Jul 12, 2023
  • Number of updates: 18
  • Update frequency: every 103.4 days
  • Top authors: postnlfloraathome (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,926 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-includes/functions.php+6691
    file_get_contents(wp-content/plugins/woocommerce/woocommerce.php): failed to open stream: No such file or directory

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.76ms] Passed 4 tests

This is a short check of server-side resources used by Flora@home plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.14 ▼5.27
Dashboard /wp-admin3.31 ▲0.0045.61 ▼7.07
Posts /wp-admin/edit.php3.36 ▲0.0046.59 ▼9.68
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.08 ▼5.00
Media Library /wp-admin/upload.php3.23 ▲0.0034.87 ▼0.57

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Flora@home plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.39 ▼0.981.69 ▼0.3140.24 ▼4.57
Dashboard /wp-admin2,203 ▲155.91 ▲0.10108.70 ▼6.6739.59 ▼7.48
Posts /wp-admin/edit.php2,092 ▲31.97 ▼0.0639.26 ▲3.1635.92 ▲0.81
Add New Post /wp-admin/post-new.php1,534 ▲123.16 ▲0.07608.16 ▼26.9353.46 ▼10.34
Media Library /wp-admin/upload.php1,388 ▼04.21 ▲0.0596.99 ▲3.7342.47 ▲1.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/florahome/admin/partials/florahome-admin-display.php:317
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/florahome/admin/partials/florahome-admin-errors.php:90
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/file.php' (include_path='.:/usr/share/php') in wp-content/plugins/florahome/admin/partials/florahome-import-image.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/florahome/admin/partials/florahome-product-import.php:774
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/florahome/admin/partials/florahome-import-image.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function delete_option() in wp-content/plugins/florahome/uninstall.php:13
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/file.php): failed to open stream: No such file or directory in wp-content/plugins/florahome/admin/partials/florahome-import-image.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/florahome/admin/partials/florahome-order-screen.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/florahome/public/partials/florahome-public-display.php:74

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)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === florahome === )
The official readme.txt is a good inspiration

florahome/florahome.php Passed 13 tests

The main file in "Flora@home plugin" v. 1.2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
18 characters long description:
www.floraathome.nl

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin2,173 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP241,1276011,997
JavaScript214786
PO File44464
CSS17324
Markdown1102

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity5.46
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods43
▷ Static methods49.30%
▷ Public methods3683.72%
▷ Protected methods00.00%
▷ Private methods716.28%
Functions49
▷ Named functions49100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin