84% add-to-google-calendar-contact-form-7

Code Review | Add to Google Calendar for Contact Form 7

WordPress plugin Add to Google Calendar for Contact Form 7 scored84%from 54 tests.

About plugin

  • Plugin page: add-to-google-cal...
  • Plugin version: 1.5
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.2
  • WordPress version: 6.3.1
  • First release: Jan 30, 2019
  • Latest release: May 8, 2019
  • Number of updates: 22
  • Update frequency: every 4.5 days
  • Top authors: samuelsilvapt (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /3,613 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Server-side resources used by Add to Google Calendar for Contact Form 7
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.88 ▼1.56
Dashboard /wp-admin3.32 ▼0.0347.72 ▼20.43
Posts /wp-admin/edit.php3.37 ▲0.0151.59 ▼0.23
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.86 ▼18.32
Media Library /wp-admin/upload.php3.24 ▲0.0139.22 ▲0.78

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Add to Google Calendar for Contact Form 7
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.51 ▲0.021.95 ▼0.1943.78 ▲1.08
Dashboard /wp-admin2,197 ▲235.61 ▲0.0590.94 ▼13.2041.47 ▼1.67
Posts /wp-admin/edit.php2,102 ▲22.01 ▲0.0040.65 ▲2.1238.23 ▲3.82
Add New Post /wp-admin/post-new.php1,542 ▲123.44 ▲5.19679.91 ▲40.5053.79 ▼11.28
Media Library /wp-admin/upload.php1,402 ▲24.23 ▲0.0194.19 ▼8.8444.95 ▲3.28

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/add-to-google-calendar-contact-form-7/admin-atc.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: contactform7, googlecalendar, forms, eventbutton, addtocalendar

add-to-google-calendar-contact-form-7/add-to-calendar-cf7.php 92% from 13 tests

The primary PHP file in "Add to Google Calendar for Contact Form 7" version 1.5 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("add-to-google-calendar-contact-form-7.php" instead of "add-to-calendar-cf7.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected298 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP46328199
JavaScript116565
CSS21034

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 were not PNG files found in your plugin