84% contact-form-7-browsing-history

Code Review | Browsing History

WordPress plugin Browsing History scored 84% from 54 tests.

About plugin

  • Plugin page: contact-form-7-br...
  • Plugin version: 4.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.1-5.8
  • WordPress version: 6.3.1
  • First release: Dec 24, 2014
  • Latest release: Aug 5, 2021
  • Number of updates: 22
  • Update frequency: every 109.8 days
  • Top authors: biztechc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,041 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

Server-side resources used by Browsing History
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.40 ▼5.62
Dashboard /wp-admin3.31 ▲0.0045.17 ▼5.28
Posts /wp-admin/edit.php3.36 ▲0.0047.32 ▲1.47
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.13 ▼15.90
Media Library /wp-admin/upload.php3.23 ▲0.0034.61 ▲0.62

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

Browser metrics Passed 4 tests

A check of browser resources used by Browsing History
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.59 ▼0.711.71 ▲0.0741.53 ▲0.15
Dashboard /wp-admin2,203 ▲124.90 ▼0.1398.35 ▼0.0039.35 ▼2.23
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0536.66 ▲1.9532.47 ▼2.83
Add New Post /wp-admin/post-new.php1,514 ▼017.78 ▲0.31686.74 ▲11.6460.25 ▼9.50
Media Library /wp-admin/upload.php1,382 ▼64.24 ▲0.0494.24 ▼12.0142.97 ▼4.56

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-7-browsing-history/bt-wpcf7-extra-body.php:19

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (screenshot-1.png)
You can look at the official readme.txt

contact-form-7-browsing-history/bt-wpcf7-extra-body.php 92% from 13 tests

The main file in "Browsing History" v. 4.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("contact-form-7-browsing-history.php" instead of "bt-wpcf7-extra-body.php")

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
No dangerous file extensions were detected81 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1202181

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.71
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%
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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png6.37KB2.95KB▼ 53.76%