93% contact-form-7-charts

Code Review | Contact Form 7 Charts

WordPress plugin Contact Form 7 Charts scored 93% from 54 tests.

About plugin

  • Plugin page: contact-form-7-ch...
  • Plugin version: 1.0 8/1/13...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.6
  • WordPress version: 5.9.2
  • First release: Aug 30, 2013
  • Latest release: Aug 30, 2013
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: ghagen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 2,555 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼292.95ms] Passed 4 tests

Analyzing server-side resources used by Contact Form 7 Charts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0555.69 ▲2.52
Dashboard /wp-admin3.46 ▲0.0535.66 ▲2.23
Posts /wp-admin/edit.php3.69 ▲0.0538.75 ▲2.74
Add New Post /wp-admin/post-new.php6.93 ▼0.0492.00 ▼1,175.35
Media Library /wp-admin/upload.php3.34 ▲0.0424.11 ▼1.19

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Contact Form 7 Charts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,999 ▲24516.11 ▲0.506.35 ▼1.552.37 ▼0.43
Dashboard /wp-admin3,102 ▲2416.52 ▲0.32123.25 ▼14.08169.21 ▲2.21
Posts /wp-admin/edit.php2,716 ▲223.27 ▲0.0366.24 ▲2.68142.98 ▲0.31
Add New Post /wp-admin/post-new.php1,775 ▲11421.04 ▼1.67453.58 ▲47.21156.38 ▲0.09
Media Library /wp-admin/upload.php1,723 ▲255.66 ▲0.14153.39 ▲16.02197.67 ▲15.09

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-7-charts/cf7charts.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Admin dashboard widget showing six-month and one-month (daily) trend charts of Contact Form 7 activity by form, similar to Google Analytics trendcharts.), #2 (Admin dashboard widget showing the one-month pie chart of combined Contact Form 7 activity by form.)
Please take inspiration from this readme.txt

contact-form-7-charts/cf7charts.php 77% from 13 tests

The entry point to "Contact Form 7 Charts" version 1.0 8/1/13... is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("contact-form-7-charts.php" instead of "cf7charts.php")
  • Version: The version number should only use digits and periods (ex. "1.0.3" instead of "1.0 8/1/13...")
  • Description: Please keep the plugin description shorter than 140 characters (currently 278 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin401 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP110724325
CSS116776

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions11
▷ Named functions11100.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