78% loftloader

Code Review | LoftLoader

WordPress plugin LoftLoader scored78%from 54 tests.

About plugin

  • Plugin page: loftloader
  • Plugin version: 2.4.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Mar 1, 2016
  • Latest release: Nov 29, 2022
  • Number of updates: 55
  • Update frequency: every 44.8 days
  • Top authors: loftocean (100%)

Code review

54 tests

User reviews

30 reviews

Install metrics

70,000+ active /517,852 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.13MB] [CPU: ▼8.38ms] Passed 4 tests

An overview of server-side resources used by LoftLoader
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2337.66 ▼1.23
Dashboard /wp-admin3.41 ▲0.0746.85 ▼15.22
Posts /wp-admin/edit.php3.58 ▲0.2347.02 ▼2.64
Add New Post /wp-admin/post-new.php5.99 ▲0.1182.70 ▼13.74
Media Library /wp-admin/upload.php3.34 ▲0.1136.97 ▼1.91
LoftLoader Lite /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php&plugin=loftloader-lite4.2258.73

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 59 new files
Database: no new tables, 16 new options
New WordPress options
loftloader_loader_color
loftloader_lite_version
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
loftloader_loader_type
loftloader_bg_color
can_compress_scripts
widget_recent-posts
loftloader_main_switch
...

Browser metrics Passed 4 tests

Checking browser requirements for LoftLoader
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲7814.35 ▲0.001.81 ▲0.3144.39 ▲6.38
Dashboard /wp-admin2,199 ▲215.55 ▼0.0583.65 ▼15.0740.11 ▼1.59
Posts /wp-admin/edit.php2,107 ▲71.97 ▼0.0440.79 ▲5.5734.35 ▼0.86
Add New Post /wp-admin/post-new.php1,534 ▲823.75 ▲0.80679.59 ▲12.3956.72 ▲6.72
Media Library /wp-admin/upload.php1,404 ▲44.26 ▲0.0592.50 ▼22.5745.35 ▼2.42
LoftLoader Lite /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php&plugin=loftloader-lite2,96911.38225.1984.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 16 options in the database
    • loftloader_bg_color
    • loftloader_main_switch
    • loftloader_loader_type
    • loftloader_img_width
    • widget_recent-posts
    • loftloader_loader_color
    • loftloader_custom_img
    • db_upgraded
    • loftloader_show_range
    • widget_recent-comments
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 16× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/loftloader/inc/class-loftloader-upgrade.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/loftloader/inc/configs/customize-range.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/loftloader/inc/configs/customize-background.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/loftloader/inc/configs/customize-main.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/loftloader/loftloader.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/loftloader/inc/configs/customize-promo.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/loftloader/inc/configs/customize-advanced.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/loftloader/inc/configs/customize-more.php:7
    • > PHP Warning
      Use of undefined constant LOFTLOADER_ROOT - assumed 'LOFTLOADER_ROOT' (this will throw an Error in a future version of PHP) in wp-content/plugins/loftloader/inc/class-loftloader-customize.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/loftloader/inc/any-page/gutenberg/class-gutenberg-any-page.php:72

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php&plugin=loftloader-lite
    • > Security (warning) in unknown
    /?plugin=loftloader-lite&customize_changeset_uuid=3ebf9eb3-bc19-4962-b5a1-c0ae7bfddda3&customize_theme=twentytwentyone&customize_messenger_channel=preview-0 - An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing.

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Donate link: Invalid url: ""
The official readme.txt might help

loftloader/loftloader.php Passed 13 tests

The main PHP file in "LoftLoader" ver. 2.4.0 adds more information about the plugin and also serves as the entry point for this plugin
93 characters long description:
An easy to use plugin to add an animated preloader to your website with fully customisations.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected5,183 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
CSS546962,181
Sass4207121,360
PHP15932631,317
JavaScript72529325

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity10.86
▷ Minimum class complexity2.00
▷ Maximum class complexity56.00
Average method complexity3.16
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods64
▷ Static methods00.00%
▷ Public methods4671.88%
▷ Protected methods812.50%
▷ Private methods1015.62%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
25 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/ui-bg_glass_100_fdf5ce_1x400.png0.10KB0.11KB0.00%
assets/css/images/ui-bg_glass_45_0078ae_1x400.png0.34KB0.16KB▼ 52.60%
assets/css/images/ui-icons_e0fdff_256x240.png4.44KB4.17KB▼ 6.02%
assets/css/images/ui-icons_ef8c08_256x240.png4.44KB4.17KB▼ 6.02%
assets/css/images/ui-icons_acacac_256x240.png3.90KB1.71KB▼ 56.09%