84% caag-forms

Code Review | Caag Forms

WordPress plugin Caag Forms scored84%from 54 tests.

About plugin

  • Plugin page: caag-forms
  • Plugin version: 2.0.4
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.0-4.8.0
  • WordPress version: 6.3.1
  • First release: Oct 27, 2017
  • Latest release: Aug 12, 2018
  • Number of updates: 18
  • Update frequency: every 18.6 days
  • Top authors: caagsoftware (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,268 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 gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.17ms] Passed 4 tests

A check of server-side resources used by Caag Forms
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.92 ▼1.55
Dashboard /wp-admin3.33 ▲0.0355.35 ▲5.98
Posts /wp-admin/edit.php3.38 ▲0.0348.99 ▼0.55
Add New Post /wp-admin/post-new.php5.91 ▲0.0397.24 ▼3.41
Media Library /wp-admin/upload.php3.25 ▲0.0336.42 ▲0.85
Caag Forms /wp-admin/options-general.php?page=caag3.2229.39

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
caag_forms_user_token
caag_forms_tenant_token
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
caag_forms_user_api_base_url
db_upgraded

Browser metrics Passed 4 tests

Caag Forms: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲1914.72 ▲0.381.99 ▲0.0242.26 ▼0.22
Dashboard /wp-admin2,208 ▲405.53 ▼0.0387.32 ▼14.2639.42 ▼5.34
Posts /wp-admin/edit.php2,119 ▲192.01 ▲0.0639.33 ▼0.5235.48 ▼2.97
Add New Post /wp-admin/post-new.php1,539 ▲1123.17 ▲0.37602.98 ▼31.7449.20 ▼1.30
Media Library /wp-admin/upload.php1,416 ▲164.23 ▲0.12103.07 ▼9.7346.09 ▼1.87
Caag Forms /wp-admin/options-general.php?page=caag8682.1429.4431.28

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • caag_forms_tenant_token
    • widget_recent-comments
    • caag_forms_user_token
    • caag_forms_user_api_base_url
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following
  • 11× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/caag-forms/modules/api/utils.php:117
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/caag-forms/modules/settings/settings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/caag-forms/modules/api/utils.php:117
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/caag-forms/modules/custom-posts/caag-forms.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/caag-forms/modules/assets/init.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/caag-forms/modules/shortcodes/caag_form.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/caag-forms/modules/custom-posts/caag-forms.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/caag-forms/modules/settings/settings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/caag-forms/modules/custom-posts/caag-forms.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/caag-forms/modules/shortcodes/caag_form.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === caag-forms === )
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
The official readme.txt is a good inspiration

caag-forms/caag-forms.php Passed 13 tests

The primary PHP file in "Caag Forms" version 2.0.4 is used by WordPress to initiate all plugin functionality
82 characters long description:
Use this plugin to easily add your Caag Software Forms into your Wordpress Website

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
Success! There were no dangerous files found in this plugin508 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP1153133408
CSS14881
JavaScript321517
Markdown1302

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants17100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin