78% gf-custom-style

Code Review | GF Custom Style

WordPress plugin GF Custom Style scored 78% from 54 tests.

About plugin

  • Plugin page: gf-custom-style
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 22, 2017
  • Latest release: Sep 4, 2018
  • Number of updates: 15
  • Update frequency: every 21.8 days
  • Top authors: alefypf (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,239 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.78ms] Passed 4 tests

This is a short check of server-side resources used by GF Custom Style
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0546.29 ▲3.04
Dashboard /wp-admin3.32 ▲0.0246.32 ▼0.93
Posts /wp-admin/edit.php3.37 ▲0.0244.94 ▼4.58
Add New Post /wp-admin/post-new.php5.90 ▲0.0294.61 ▼6.37
Media Library /wp-admin/upload.php3.24 ▲0.0233.43 ▲0.75
GF Custom Style /wp-admin/themes.php?page=gcs-settings-theme3.2642.50

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 49 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

GF Custom Style: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲10113.21 ▼1.101.98 ▼0.0943.38 ▲2.04
Dashboard /wp-admin2,210 ▲225.83 ▲0.9597.24 ▼9.4439.97 ▼2.08
Posts /wp-admin/edit.php2,093 ▲12.02 ▼0.0134.83 ▼8.3533.80 ▼2.47
Add New Post /wp-admin/post-new.php1,537 ▲223.22 ▲0.41613.80 ▼12.4652.71 ▼3.82
Media Library /wp-admin/upload.php1,392 ▲74.20 ▲0.0194.54 ▼3.3342.97 ▼1.24
GF Custom Style /wp-admin/themes.php?page=gcs-settings-theme4,6484.83167.8927.48

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gf-custom-style/gf-custom-style-class.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/themes.php?page=gcs-settings-theme
    • > Javascript (severe) in unknown
    /wp-admin/themes.php?page=gcs-settings-theme 631:40 Uncaught TypeError: jQuery(...).live is not a function
    • > GET request to /wp-admin/themes.php?page=gcs-settings-theme
    • > Javascript (severe) in unknown
    /wp-admin/themes.php?page=gcs-settings-theme 770:42 Uncaught TypeError: jQuery(...).live is not a function
    • > GET request to /wp-admin/themes.php?page=gcs-settings-theme
    • > Javascript (severe) in unknown
    /wp-admin/themes.php?page=gcs-settings-theme 851:41 Uncaught TypeError: jQuery(...).live is not a function
    • > GET request to /wp-admin/themes.php?page=gcs-settings-theme
    • > Javascript (severe) in unknown
    /wp-admin/themes.php?page=gcs-settings-theme 925:35 Uncaught TypeError: jQuery(...).live is not a function
    • > GET request to /wp-admin/themes.php?page=gcs-settings-theme
    • > Javascript (severe) in unknown
    /wp-admin/themes.php?page=gcs-settings-theme 1050:33 Uncaught TypeError: jQuery(...).live is not a function
    • > GET request to /wp-admin/themes.php?page=gcs-settings-theme
    • > Javascript (severe) in unknown
    /wp-admin/themes.php?page=gcs-settings-theme 1069:34 Uncaught TypeError: jQuery(...).live is not a function
    • > GET request to /wp-admin/themes.php?page=gcs-settings-theme
    • > Javascript (severe) in unknown
    /wp-admin/themes.php?page=gcs-settings-theme 1118:28 Uncaught TypeError: jQuery(...).live is not a function
    • > GET request to /wp-admin/themes.php?page=gcs-settings-theme
    • > Javascript (severe) in unknown
    /wp-admin/themes.php?page=gcs-settings-theme 1139:37 Uncaught TypeError: jQuery(...).live is not a function

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Screen example 1), #2 (Screen example 2), #3 (Screen example 3), #4 (Config screen)
Please take inspiration from this readme.txt

gf-custom-style/gf-custom-style.php Passed 13 tests

The primary PHP file in "GF Custom Style" version 2.0 is used by WordPress to initiate all plugin functionality
56 characters long description:
Customize gravity forms plugin, colors, inputs... style.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin4,526 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP114352932,291
JSON2001,041
JavaScript914614579
Sass7371554
PO File1182059
CSS2022

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity19.12
▷ Minimum class complexity1.00
▷ Maximum class complexity112.00
Average method complexity3.69
▷ Minimum method complexity1.00
▷ Maximum method complexity75.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods54
▷ Static methods3259.26%
▷ Public methods5194.44%
▷ Protected methods11.85%
▷ Private methods23.70%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants42
▷ Global constants00.00%
▷ Class constants42100.00%
▷ Public constants42100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
btn.png0.58KB0.34KB▼ 41.89%
assets/images/grid.png49.84KB18.89KB▼ 62.10%