84% cf7-gist-extension

Code Review | Contact Form 7 GIST Extension

WordPress plugin Contact Form 7 GIST Extension scored 84% from 54 tests.

About plugin

  • Plugin page: cf7-gist-extension
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.2
  • WordPress version: 6.3.1
  • First release: Feb 19, 2019
  • Latest release: Sep 21, 2019
  • Number of updates: 3
  • Update frequency: every 71.3 days
  • Top authors: patilvikasj (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 624 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.08ms] Passed 4 tests

Analyzing server-side resources used by Contact Form 7 GIST Extension
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.00 ▼1.56
Dashboard /wp-admin3.31 ▲0.0149.07 ▼1.18
Posts /wp-admin/edit.php3.36 ▲0.0144.60 ▼4.93
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.04 ▼4.65
Media Library /wp-admin/upload.php3.24 ▲0.0136.58 ▲3.45

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Contact Form 7 GIST Extension
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲11013.56 ▼0.861.99 ▲0.0939.46 ▼6.22
Dashboard /wp-admin2,226 ▲345.84 ▲0.8896.09 ▼24.8739.56 ▼8.07
Posts /wp-admin/edit.php2,109 ▲202.03 ▲0.0339.60 ▲3.8536.10 ▲2.00
Add New Post /wp-admin/post-new.php1,529 ▼1317.84 ▼0.31612.43 ▼25.3954.44 ▼2.35
Media Library /wp-admin/upload.php1,408 ▲174.23 ▲0.05103.35 ▲4.9045.05 ▲0.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

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)
Good news, no errors were detected

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 items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/cf7-gist-extension/cf7-gist-ext.php
    • > /wp-content/plugins/cf7-gist-extension/classes/class-cf7-gist-loader.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: autoresponders, gist

cf7-gist-extension/cf7-gist-ext.php 85% from 13 tests

The main PHP script in "Contact Form 7 GIST Extension" version 1.0.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("cf7-gist-extension.php" instead of "cf7-gist-ext.php")

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
Everything looks great! No dangerous files found in this plugin137 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24574106
JavaScript19131

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods222.22%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected