84% custom-code-keeper

Code Review | Custom Code Keeper for Gravity Forms

WordPress plugin Custom Code Keeper for Gravity Forms scored84%from 54 tests.

About plugin

  • Plugin page: custom-code-keeper
  • Plugin version: 2.3.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.1
  • WordPress version: 6.3.1
  • First release: Feb 18, 2022
  • Latest release: Nov 10, 2022
  • Number of updates: 4
  • Update frequency: every 66.3 days
  • Top authors: UaMV (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /748 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.14ms] Passed 4 tests

Server-side resources used by Custom Code Keeper for Gravity Forms
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0543.25 ▲0.19
Dashboard /wp-admin3.34 ▲0.0451.33 ▼3.50
Posts /wp-admin/edit.php3.39 ▲0.0456.45 ▲1.36
Add New Post /wp-admin/post-new.php5.92 ▲0.0486.92 ▼18.61
Media Library /wp-admin/upload.php3.27 ▲0.0440.12 ▲2.69

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Custom Code Keeper for Gravity Forms: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.23 ▼0.121.58 ▼0.3037.39 ▼5.18
Dashboard /wp-admin2,195 ▲145.63 ▼0.0284.82 ▼19.8439.02 ▼2.67
Posts /wp-admin/edit.php2,103 ▲32.02 ▼0.0940.17 ▼1.5635.80 ▼3.56
Add New Post /wp-admin/post-new.php1,528 ▲222.88 ▼0.64589.93 ▼57.7653.66 ▼4.57
Media Library /wp-admin/upload.php1,403 ▲64.20 ▲0.0096.19 ▼16.7942.54 ▼6.45

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 2× 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/custom-code-keeper/files/gravityhopper-custom-code-keeper-loader.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'GFForms' not found in wp-content/plugins/custom-code-keeper/class-gh-cck.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: developer, code, gravity, snippets, forms...

custom-code-keeper/gravityhopper-custom-code-keeper.php 85% from 13 tests

The entry point to "Custom Code Keeper for Gravity Forms" version 2.3.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("custom-code-keeper.php" instead of "gravityhopper-custom-code-keeper.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected553 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP5265238517
JavaScript17320
Markdown15016

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity56.00
▷ Minimum class complexity56.00
▷ Maximum class complexity56.00
Average method complexity3.04
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods25
▷ Static methods1664.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions112.50%
▷ Anonymous functions787.50%
Constants3
▷ Global constants3100.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
There were not PNG files found in your plugin