84% gravity-forms-light-blue-api-add-on

Code Review | Gravity Forms Light Blue API Add-On

WordPress plugin Gravity Forms Light Blue API Add-On scored84%from 54 tests.

About plugin

  • Plugin page: gravity-forms-lig...
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 8, 2014
  • Latest release: Dec 20, 2022
  • Number of updates: 23
  • Update frequency: every 140.9 days
  • Top authors: TomCatchesides (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,728 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.09ms] Passed 4 tests

An overview of server-side resources used by Gravity Forms Light Blue API Add-On
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0634.07 ▼4.20
Dashboard /wp-admin3.36 ▲0.0245.00 ▼17.34
Posts /wp-admin/edit.php3.41 ▲0.0643.93 ▼3.54
Add New Post /wp-admin/post-new.php5.94 ▲0.0692.63 ▼3.27
Media Library /wp-admin/upload.php3.29 ▲0.0635.30 ▲0.66

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Gravity Forms Light Blue API Add-On
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲3613.27 ▼1.084.40 ▲2.2940.87 ▼3.12
Dashboard /wp-admin2,210 ▲195.79 ▼0.1294.31 ▼9.4040.49 ▼5.29
Posts /wp-admin/edit.php2,095 ▲242.00 ▼0.0136.49 ▲1.0235.61 ▼0.55
Add New Post /wp-admin/post-new.php1,549 ▲2718.43 ▼4.68619.49 ▼83.1750.74 ▼0.76
Media Library /wp-admin/upload.php1,398 ▲104.19 ▲0.0395.88 ▲0.7243.74 ▼0.08

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gravity-forms-light-blue-api-add-on/gravity-forms-light-blue.php:51

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (The Gravity Forms Light Blue API add-on settings page) image missing
The official readme.txt is a good inspiration

gravity-forms-light-blue-api-add-on/gravity-forms-light-blue.php 92% from 13 tests

The principal PHP file in "Gravity Forms Light Blue API Add-On" v. 1.2.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("gravity-forms-light-blue-api-add-on.php" instead of "gravity-forms-light-blue.php")

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
Success! There were no dangerous files found in this plugin359 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16846359

PHP code Passed 2 tests

This is a very shot review of 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.62
Average class complexity81.00
▷ Minimum class complexity81.00
▷ Maximum class complexity81.00
Average method complexity9.89
▷ Minimum method complexity1.00
▷ Maximum method complexity60.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods9100.00%
▷ Public methods888.89%
▷ Protected methods00.00%
▷ Private methods111.11%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.15MB with 0.10MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png152.68KB47.23KB▼ 69.06%