78% floorplans-lite

Code Review | Floorplans - Lite

WordPress plugin Floorplans - Lite scored78%from 54 tests.

About plugin

  • Plugin page: floorplans-lite
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4.1
  • WordPress version: 6.3.1
  • First release: Dec 4, 2022
  • Latest release: Nov 21, 2023
  • Number of updates: 24
  • Update frequency: every 15.3 days
  • Top authors: Martien van Lent (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /714 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.47MB] [CPU: ▲1.21ms] Passed 4 tests

An overview of server-side resources used by Floorplans - Lite
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.95 ▲0.4845.99 ▲4.82
Dashboard /wp-admin3.80 ▲0.4955.31 ▲3.31
Posts /wp-admin/edit.php3.85 ▲0.4952.34 ▼0.62
Add New Post /wp-admin/post-new.php6.38 ▲0.4992.96 ▼2.67
Media Library /wp-admin/upload.php3.66 ▲0.4240.82 ▲5.66
Settings /wp-admin/edit.php?post_type=floorplan&page=floorplans-settings3.6439.50
All Floorplans /wp-admin/edit.php?post_type=floorplan3.7937.76
Add New /wp-admin/post-new.php?post_type=floorplan6.3688.78

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Floorplans - Lite
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6214.72 ▲0.381.78 ▲0.0543.98 ▲1.15
Dashboard /wp-admin2,229 ▲545.62 ▼0.0988.94 ▼25.4139.98 ▼4.65
Posts /wp-admin/edit.php2,128 ▲282.03 ▲0.0936.80 ▼2.6032.31 ▼4.06
Add New Post /wp-admin/post-new.php1,552 ▲2623.21 ▲0.08691.82 ▲67.3454.34 ▲1.40
Media Library /wp-admin/upload.php1,431 ▲314.22 ▲0.0699.41 ▲0.4841.18 ▼0.64
Settings /wp-admin/edit.php?post_type=floorplan&page=floorplans-settings8682.0128.5550.78
All Floorplans /wp-admin/edit.php?post_type=floorplan1,1162.0235.8835.54
Add New /wp-admin/post-new.php?post_type=floorplan6,19624.93889.5433.22

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • floorplans
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% 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)
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/floorplans-lite/public/js/floorplans-lite-js.php
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/floorplans-lite/floorplans.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Floorplans_Post' not found in wp-content/plugins/floorplans-lite/includes/class-data.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Floorplans_Shortcode' not found in wp-content/plugins/floorplans-lite/includes/class-view.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Floorplans_Vars' not found in wp-content/plugins/floorplans-lite/includes/class-settings.php:3

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: floor, gutenberg, floorplan, plan, form

floorplans-lite/floorplans.php 92% from 13 tests

The main PHP script in "Floorplans - Lite" version 1.2.1 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("floorplans-lite.php" instead of "floorplans.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected8,745 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript101,3034814,613
PHP217141891,686
CSS4308621,374
PO File2312672799
SVG1160159
JSON240114

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity19.13
▷ Minimum class complexity1.00
▷ Maximum class complexity56.00
Average method complexity3.73
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods85
▷ Static methods1011.76%
▷ Public methods7487.06%
▷ Protected methods00.00%
▷ Private methods1112.94%
Functions21
▷ Named functions314.29%
▷ Anonymous functions1885.71%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/img/logo.png4.07KB2.33KB▼ 42.67%