62% form-ga

Code Review | GAPlugin - Form

WordPress plugin GAPlugin - Form scored62%from 54 tests.

About plugin

  • Plugin page: form-ga
  • Plugin version: 0.01.00.00
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.6
  • WordPress version: 6.3.1
  • First release: Feb 2, 2021
  • Latest release: Feb 6, 2021
  • Number of updates: 10
  • Update frequency: every 0.4 days
  • Top authors: gautierantoine (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /364 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.94MB] [CPU: ▼33.58ms] Passed 4 tests

Analyzing server-side resources used by GAPlugin - Form
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.00 ▼4.75
Dashboard /wp-admin3.01 ▼0.3021.62 ▼26.61
Posts /wp-admin/edit.php3.01 ▼0.3521.61 ▼24.62
Add New Post /wp-admin/post-new.php3.01 ▼2.8822.69 ▼72.23
Media Library /wp-admin/upload.php3.01 ▼0.2221.30 ▼10.86
GAPlugin /wp-admin/admin.php?page=gap-admin-page3.0123.47
Form /wp-admin/admin.php?page=gap-admin-page-form3.0130.37

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
gap_form_option
can_compress_scripts

Browser metrics Passed 4 tests

GAPlugin - Form: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲9313.60 ▼0.754.12 ▲2.4343.27 ▲0.32
Dashboard /wp-admin2,245 ▲655.74 ▲0.1383.62 ▼6.0087.88 ▲47.59
Posts /wp-admin/edit.php2,152 ▲522.28 ▲0.2639.37 ▲3.9836.32 ▼0.33
Add New Post /wp-admin/post-new.php1,564 ▲3623.17 ▲0.13636.49 ▼53.95172.13 ▲116.25
Media Library /wp-admin/upload.php1,453 ▲534.36 ▲0.1997.08 ▼1.9684.57 ▲39.46
GAPlugin /wp-admin/admin.php?page=gap-admin-page8411.8725.5327.34
Form /wp-admin/admin.php?page=gap-admin-page-form3,9494.60100.5546.77

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method FormGAP\GAPForm::add_settings_page() should not be called statically
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gap-admin-page-form
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method FormGAP\GAPForm::add_settings_page() should not be called statically
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gap-admin-page-form
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method FormGAP\GAPForm::page_init() should not be called statically
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gap-admin-page-form
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method FormGAP\GAPForm::admin_form() should not be called statically
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gap-admin-page-form
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method FormGAP\GAPForm::enqueue_color_picker() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gap-admin-page-form
    • > Deprecated in wp-admin/includes/template.php+1771
    Non-static method FormGAP\GAPForm::gap_list_section() should not be called statically

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/form-ga/gaplugin-form.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'FormGAP\\GAPMail' not found in wp-content/plugins/form-ga/includes/FormGAP/GAPFormSC.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'FormGAP\\BaseConst' not found in wp-content/plugins/form-ga/includes/FormGAP/GAPForm.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'FormGAP\\BaseConst' not found in wp-content/plugins/form-ga/includes/FormGAP/GAPMail.php:6

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 90% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
1 plugin tags: form

form-ga/gaplugin-form.php 77% from 13 tests

The principal PHP file in "GAPlugin - Form" v. 0.01.00.00 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Main file name: Name the main plugin file the same as the plugin slug ("form-ga.php" instead of "gaplugin-form.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,042 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP779242909
CSS12093
Markdown110025
JavaScript2009
SVG1006

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity29.75
▷ Minimum class complexity1.00
▷ Maximum class complexity66.00
Average method complexity5.79
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods24
▷ Static methods1770.83%
▷ Public methods1875.00%
▷ Protected methods625.00%
▷ Private methods00.00%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin