83% contact-form-7-charts

Code Review | Contact Form 7 Charts

WordPress plugin Contact Form 7 Charts scored83%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: 6.3.1
  • 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

50+ active /2,788 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼6.92ms] Passed 4 tests

Server-side resources used by Contact Form 7 Charts
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0534.86 ▼7.09
Dashboard /wp-admin3.36 ▲0.0544.44 ▼10.37
Posts /wp-admin/edit.php3.40 ▲0.0447.02 ▲1.63
Add New Post /wp-admin/post-new.php5.95 ▲0.0680.12 ▼11.83
Media Library /wp-admin/upload.php3.28 ▲0.0437.31 ▲1.82

Server storage [IO: ▲0.02MB] [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: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Contact Form 7 Charts
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,977 ▲22013.31 ▼1.074.19 ▲2.0037.94 ▼7.65
Dashboard /wp-admin2,358 ▲1675.01 ▲0.13112.53 ▲5.0444.38 ▼1.39
Posts /wp-admin/edit.php2,111 ▲252.30 ▲0.3039.85 ▲1.9837.43 ▲3.21
Add New Post /wp-admin/post-new.php1,537 ▲1523.66 ▲0.40696.05 ▲60.7654.42 ▲1.76
Media Library /wp-admin/upload.php1,414 ▲294.36 ▲0.15115.43 ▲14.9843.35 ▼0.34

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please 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 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #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 main PHP file in "Contact Form 7 Charts" ver. 1.0 8/1/13... adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Version: Plugin version number should only contain digits separated by dots (ex. "1.0.3" instead of "1.0 8/1/13...")
  • Main file name: The principal plugin file should be the same as the plugin slug ("contact-form-7-charts.php" instead of "cf7charts.php")
  • Description: The description should be shorter than 140 characters (currently 278 characters long)

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
Good job! No executable or dangerous file extensions detected401 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP110724325
CSS116776

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No 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

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