78% g-ffl-checkout

Code Review | g-FFL Checkout

WordPress plugin g-FFL Checkout scored78%from 54 tests.

About plugin

  • Plugin page: g-ffl-checkout
  • Plugin version: 1.4.15
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Feb 16, 2023
  • Latest release: Nov 2, 2023
  • Number of updates: 75
  • Update frequency: every 3.5 days
  • Top authors: garidium (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

90+ active /1,683 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼11.07ms] Passed 4 tests

A check of server-side resources used by g-FFL Checkout
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.40 ▼0.93
Dashboard /wp-admin3.31 ▼0.0444.88 ▼19.75
Posts /wp-admin/edit.php3.36 ▲0.0047.56 ▼4.93
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.38 ▼12.77
Media Library /wp-admin/upload.php3.23 ▲0.0031.77 ▼6.84

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for g-FFL Checkout
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.28 ▲0.091.60 ▼0.1341.14 ▲1.20
Dashboard /wp-admin2,195 ▲215.56 ▼0.0284.81 ▼1.6040.93 ▲1.27
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0637.89 ▼2.2036.83 ▼1.47
Add New Post /wp-admin/post-new.php1,537 ▲918.24 ▼4.87624.64 ▼43.2873.53 ▲19.65
Media Library /wp-admin/upload.php1,403 ▲34.21 ▲0.1399.51 ▼18.8042.08 ▼7.30

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
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/g-ffl-checkout/includes/ffl_ordering.php
    • > /wp-content/plugins/g-ffl-checkout/public/partials/ffl-api-public-display.php
    • > /wp-content/plugins/g-ffl-checkout/admin/partials/ffl-api-admin-display.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/g-ffl-checkout/includes/class-ffl-api.php:244

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: ecommerce checkout, ffl gun dealers, woocommerce, map api, ffl...

g-ffl-checkout/g-ffl-api.php 77% from 13 tests

The main PHP script in "g-FFL Checkout" version 1.4.15 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("g-ffl-checkout.php" instead of "g-ffl-api.php")
  • 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 detected3,245 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript32005802,328
PHP14229593917
CSS1040

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity5.29
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity1.73
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods31
▷ Static methods26.45%
▷ Public methods2683.87%
▷ Protected methods00.00%
▷ Private methods516.13%
Functions18
▷ Named functions1794.44%
▷ Anonymous functions15.56%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.29MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/example3.png91.98KB88.30KB▼ 4.00%
public/includes/images/ffl_required.png40.56KB10.62KB▼ 73.82%
admin/images/example2.png33.59KB29.67KB▼ 11.69%
admin/images/ffl-logo.png7.76KB4.29KB▼ 44.65%
admin/images/example1.png72.88KB21.62KB▼ 70.33%