78% ffl-api

Code Review | FFL API WooCommerce Plugin

WordPress plugin FFL API WooCommerce Plugin scored78%from 54 tests.

About plugin

  • Plugin page: ffl-api
  • Plugin version: 1.6.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Feb 26, 2020
  • Latest release: Aug 24, 2023
  • Number of updates: 35
  • Update frequency: every 36.4 days
  • Top authors: optimum7 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,359 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

A check of server-side resources used by FFL API WooCommerce Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.94 ▲0.13
Dashboard /wp-admin3.31 ▲0.0046.13 ▼6.90
Posts /wp-admin/edit.php3.36 ▲0.0046.71 ▼7.93
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.31 ▼8.11
Media Library /wp-admin/upload.php3.23 ▲0.0033.51 ▼3.48

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 117 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for FFL API WooCommerce Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.37 ▼0.191.71 ▲0.0247.94 ▲3.78
Dashboard /wp-admin2,195 ▲155.59 ▼0.0192.91 ▲6.9142.78 ▲3.25
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0140.04 ▲4.7136.00 ▲1.84
Add New Post /wp-admin/post-new.php1,529 ▲323.28 ▼0.21608.49 ▼25.4163.01 ▲7.73
Media Library /wp-admin/upload.php1,400 ▲34.16 ▲0.0196.24 ▼4.9539.63 ▼3.72

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

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)
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 take a closer look at the following
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ffl-api/admin/partials/ffl-api-admin-display.php
    • > /wp-content/plugins/ffl-api/public/partials/ffl-api-public-display.php
    • > /wp-content/plugins/ffl-api/wp-dynamic-css/bootstrap.php
  • 19× 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 add_filter() in wp-content/plugins/ffl-api/includes/class-ffl-api.php:244
    • > PHP Fatal error
      Uncaught Error: Class 'Puc_v4p8_Vcs_Api' not found in wp-content/plugins/ffl-api/plugin-update-checker/Puc/v4p8/Vcs/GitHubApi.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Puc_v4p8_Update' not found in wp-content/plugins/ffl-api/plugin-update-checker/Puc/v4p8/Plugin/Update.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Puc_v4p8_UpdateChecker' not found in wp-content/plugins/ffl-api/plugin-update-checker/Puc/v4p8/Plugin/UpdateChecker.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Puc_v4p8_Theme_UpdateChecker' not found in wp-content/plugins/ffl-api/plugin-update-checker/Puc/v4p8/Vcs/ThemeUpdateChecker.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Puc_v4p8_Plugin_UpdateChecker' not found in wp-content/plugins/ffl-api/plugin-update-checker/Puc/v4p8/Vcs/PluginUpdateChecker.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Puc_v4p8_Metadata' not found in wp-content/plugins/ffl-api/plugin-update-checker/Puc/v4p8/Update.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Puc_v4p8_InstalledPackage' not found in wp-content/plugins/ffl-api/plugin-update-checker/Puc/v4p8/Theme/Package.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Puc_v4p8_DebugBar_Panel' not found in wp-content/plugins/ffl-api/plugin-update-checker/Puc/v4p8/DebugBar/PluginPanel.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Puc_v4p8_Vcs_Api' not found in wp-content/plugins/ffl-api/plugin-update-checker/Puc/v4p8/Vcs/BitBucketApi.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% 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
8 plugin tags: ecommerce checkout, woocommerce, google maps, map api, gun dealer...

ffl-api/ffl-api.php 92% from 13 tests

The main PHP file in "FFL API WooCommerce Plugin" ver. 1.6.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.0" instead of "3.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected7,894 lines of code in 88 files:
LanguageFilesBlank linesComment linesLines of code
PHP571,8123,1436,477
PO File169295532
Markdown21830530
JavaScript46938164
CSS414596
JSON58095

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity19.70
▷ Minimum class complexity1.00
▷ Maximum class complexity159.00
Average method complexity2.99
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes45
▷ Abstract classes511.11%
▷ Concrete classes4088.89%
▷ Final classes00.00%
Methods452
▷ Static methods296.42%
▷ Public methods26959.51%
▷ Protected methods16436.28%
▷ Private methods194.20%
Functions19
▷ Named functions1894.74%
▷ Anonymous functions15.26%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/ffl-logo.png17.42KB11.79KB▼ 32.30%
admin/images/example.png42.16KB12.28KB▼ 70.88%