61% florapress

Code Review | FloraPress - Your Garden on WordPress

WordPress plugin FloraPress - Your Garden on WordPress scored61%from 54 tests.

About plugin

  • Plugin page: florapress
  • Plugin version: 1.0.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 25, 2020
  • Latest release: Oct 31, 2023
  • Number of updates: 31
  • Update frequency: every 41.5 days
  • Top authors: blackandwhitedigital (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /1,377 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲5.58MB] [CPU: ▲29.67ms] 50% from 4 tests

Server-side resources used by FloraPress - Your Garden on WordPress
Please have a look at the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 2,136.43ms on /wp-admin/admin.php?page=florapress-options)
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 5.58MB on /wp-admin/edit.php?post_type=plant-profile)
PageMemory (MB)CPU Time (ms)
Home /9.30 ▲5.8375.36 ▲34.07
Dashboard /wp-admin9.32 ▲6.0175.46 ▲23.19
Posts /wp-admin/edit.php9.32 ▲5.9691.30 ▲37.75
Add New Post /wp-admin/post-new.php10.40 ▲4.51121.07 ▲27.30
Media Library /wp-admin/upload.php9.32 ▲6.0971.54 ▲34.10
Year or Season /wp-admin/edit-tags.php?taxonomy=season&post_type=planting-profile9.3876.97
Planting Plans /wp-admin/edit.php?post_type=planting-profile9.3266.11
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius9.3265.17
Options /wp-admin/admin.php?page=florapress-options9.322,136.43
Used For /wp-admin/edit-tags.php?taxonomy=used-for&post_type=plot-profile9.3865.30
Plot Profiles /wp-admin/edit.php?post_type=plot-profile9.3269.69
Theme /wp-admin/edit-tags.php?taxonomy=theme&post_type=bed9.3863.29
Types /wp-admin/edit-tags.php?taxonomy=type&post_type=plant-profile9.3871.61
Plant Profiles /wp-admin/edit.php?post_type=plant-profile9.3265.12

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

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

Browser metrics Passed 4 tests

A check of browser resources used by FloraPress - Your Garden on WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,012 ▲25113.92 ▼0.658.83 ▲7.1129.97 ▼16.59
Dashboard /wp-admin2,301 ▲1295.72 ▲0.1097.58 ▼7.6045.19 ▼0.48
Posts /wp-admin/edit.php2,211 ▲1112.22 ▲0.1840.88 ▲5.7437.14 ▲2.63
Add New Post /wp-admin/post-new.php1,602 ▲7623.16 ▲0.06663.74 ▼61.1251.41 ▼3.45
Media Library /wp-admin/upload.php1,497 ▲974.26 ▲0.0897.20 ▼13.4345.72 ▼2.96
Year or Season /wp-admin/edit-tags.php?taxonomy=season&post_type=planting-profile1,3802.0230.4533.75
Planting Plans /wp-admin/edit.php?post_type=planting-profile1,2092.0435.7832.54
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,1581.8829.4028.28
Options /wp-admin/admin.php?page=florapress-options1,0691.7126.9761.52
Used For /wp-admin/edit-tags.php?taxonomy=used-for&post_type=plot-profile1,3802.0130.5929.86
Plot Profiles /wp-admin/edit.php?post_type=plot-profile1,2252.1735.0030.19
Theme /wp-admin/edit-tags.php?taxonomy=theme&post_type=bed1,3762.0529.8830.92
Types /wp-admin/edit-tags.php?taxonomy=type&post_type=plant-profile2,2272.0331.0638.50
Plant Profiles /wp-admin/edit.php?post_type=plant-profile1,3372.1937.4933.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/florapress/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 10 options in the database
    • type_children
    • fs_active_plugins
    • fs_accounts
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • fs_debug_mode

Smoke tests 25% 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)
Good news, no errors were detected

SRP 0% 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
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/florapress/admin/partials/florapress-admin-display.php
    • > /wp-content/plugins/florapress/public/partials/florapress-public-display.php
  • 14× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/florapress/admin/partials/planting-profile-meta-box.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/florapress/admin/partials/bed-meta-box.php:3
    • > PHP Notice
      Undefined variable: content_ext in wp-content/plugins/florapress/public/partials/planting-profile-meta-box.php on line 23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/florapress/admin/partials/plot-profile-meta-box.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/florapress/public/partials/planting-profile-meta-box.php:51
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/florapress/public/partials/planting-profile-meta-box.php on line 46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/florapress/public/partials/plot-profile-meta-box.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/florapress/public/partials/plant-profile-meta-box.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/florapress/admin/partials/planting-profile-plot-meta-box.php:11
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/florapress/public/partials/plot-profile-meta-box.php on line 15

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=plant-profile
    • > Javascript (severe) in unknown
    /wp-content/plugins/florapress/admin/js/florapress-admin.js?ver=1.0.8 10:14 Uncaught TypeError: $(...).sortable is not a function

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Requires at least: Version format is invalid
Please take inspiration from this readme.txt

florapress/florapress.php Passed 13 tests

The principal PHP file in "FloraPress - Your Garden on WordPress" v. 1.0.8 is loaded by WordPress automatically on each request
65 characters long description:
Easily manage plant and garden information on your WordPress blog

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin39,791 lines of code in 159 files:
LanguageFilesBlank linesComment linesLines of code
PHP1388,82417,99239,134
JavaScript59586396
CSS165617261

PHP code 0% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
It is recommended to fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,096)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 508)
Cyclomatic complexity
Average complexity per logical line of code0.76
Average class complexity89.68
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity4.98
▷ Minimum method complexity1.00
▷ Maximum method complexity508.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes58
▷ Abstract classes23.45%
▷ Concrete classes5696.55%
▷ Final classes00.00%
Methods1,344
▷ Static methods20114.96%
▷ Public methods93969.87%
▷ Protected methods171.26%
▷ Private methods38828.87%
Functions104
▷ Named functions104100.00%
▷ Anonymous functions00.00%
Constants147
▷ Global constants10068.03%
▷ Class constants4731.97%
▷ Public constants47100.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
9 PNG files occupy 0.10MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/css/images/ui-icons_444444_256x240.png6.84KB4.18KB▼ 38.90%
admin/css/images/ui-icons_555555_256x240.png6.91KB4.18KB▼ 39.47%
admin/css/images/ui-icons_777777_256x240.png6.85KB4.18KB▼ 38.94%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%