83% emercury-for-gravity-forms

Code Review | Emercury for Gravity Forms

WordPress plugin Emercury for Gravity Forms scored83%from 54 tests.

About plugin

  • Plugin page: emercury-for-grav...
  • Plugin version: 1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8.1
  • WordPress version: 6.3.1
  • First release: Dec 24, 2019
  • Latest release: Oct 7, 2021
  • Number of updates: 13
  • Update frequency: every 92.6 days
  • Top authors: emercury (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /598 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Emercury for Gravity Forms
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0033.15 ▼2.79
Dashboard /wp-admin3.31 ▲0.0144.45 ▼2.79
Posts /wp-admin/edit.php3.36 ▲0.0043.29 ▼0.59
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.56 ▼0.80
Media Library /wp-admin/upload.php3.23 ▲0.0034.73 ▼14.11

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Emercury for Gravity Forms
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.111.64 ▲0.0038.70 ▼2.45
Dashboard /wp-admin2,195 ▲185.62 ▼0.0286.59 ▼6.0240.28 ▼0.86
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0136.60 ▲2.1538.63 ▼0.20
Add New Post /wp-admin/post-new.php1,526 ▼023.84 ▲0.81666.95 ▼65.2149.79 ▼4.16
Media Library /wp-admin/upload.php1,403 ▼04.19 ▼0.0294.93 ▼8.7445.17 ▲0.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'GFForms' not found in wp-content/plugins/emercury-for-gravity-forms/class-gf-emercury.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/emercury-for-gravity-forms/emercury.php:38

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (Add API key into Emercury Settings.), #2 (Create new Feed for selected Gravity Form.), #3 (Select Emercury List to connect to.), #4 (Map Emercury fields to the form fields.), #5 (The Emercury list added as an entry.)
Please take inspiration from this readme.txt

emercury-for-gravity-forms/emercury.php 85% from 13 tests

This is the main PHP file of "Emercury for Gravity Forms" version 1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("emercury-for-gravity-forms.php" instead of "emercury.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 169 characters long)

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 detected590 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3259517590

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity28.33
▷ Minimum class complexity2.00
▷ Maximum class complexity73.00
Average method complexity3.83
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2689.66%
▷ Protected methods00.00%
▷ Private methods310.34%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.16MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png26.59KB11.67KB▼ 56.12%
screenshot-2.png31.75KB13.07KB▼ 58.83%
screenshot-3.png26.72KB8.46KB▼ 68.34%
screenshot-5.png39.90KB17.16KB▼ 56.99%
screenshot-4.png36.83KB14.36KB▼ 61.00%