84% g-ffl-cockpit

Code Review | g-FFL Cockpit

WordPress plugin g-FFL Cockpit scored84%from 54 tests.

About plugin

  • Plugin page: g-ffl-cockpit
  • Plugin version: 1.2.24
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3
  • WordPress version: 6.3.1
  • First release: May 13, 2023
  • Latest release: Nov 21, 2023
  • Number of updates: 55
  • Update frequency: every 3.9 days
  • Top authors: garidium (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,556 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

A check of server-side resources used by g-FFL Cockpit
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.99 ▼3.06
Dashboard /wp-admin3.31 ▼0.0448.59 ▼14.61
Posts /wp-admin/edit.php3.36 ▲0.0050.33 ▲2.68
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.10 ▼8.04
Media Library /wp-admin/upload.php3.23 ▲0.0038.00 ▲4.38

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

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

Browser metrics Passed 4 tests

Checking browser requirements for g-FFL Cockpit
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.15 ▼0.191.89 ▲0.1337.49 ▼8.18
Dashboard /wp-admin2,195 ▲155.50 ▼0.1191.45 ▲1.6041.34 ▼0.57
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0337.15 ▲3.2135.30 ▼0.84
Add New Post /wp-admin/post-new.php1,526 ▼023.10 ▲0.15677.98 ▲18.5062.36 ▲7.39
Media Library /wp-admin/upload.php1,400 ▼34.21 ▼0.02101.81 ▲3.0242.20 ▼1.39

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/g-ffl-cockpit/includes/fulfillment_options.php
    • > /wp-content/plugins/g-ffl-cockpit/public/partials/ffl-api-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
Please take inspiration from this readme.txt

g-ffl-cockpit/g-ffl-cockpit.php 92% from 13 tests

The principal PHP file in "g-FFL Cockpit" v. 1.2.24 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Requires at least: Required version must 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 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin4,583 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP141656142,776
JSON100911
SVG101748
CSS3121780
JavaScript3189768

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity2.14
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.31
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods26
▷ Static methods27.69%
▷ Public methods2180.77%
▷ Protected methods00.00%
▷ Private methods519.23%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/ffl-cockpit-logo.png7.00KB3.92KB▼ 43.92%