94% deregister-contact-form-7

Code Review | Deregister Contact Form 7

WordPress plugin Deregister Contact Form 7 scored 94% from 54 tests.

About plugin

  • Plugin page: deregister-contac...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5+
  • WordPress version: 5.8.1
  • First release: Dec 19, 2010
  • Latest release: Jan 28, 2013
  • Number of updates: 5
  • Update frequency: every 326.8 days
  • Top authors: ryanhellyer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 3,405 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Deregister Contact Form 7
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1236.58 ▲15.64
Dashboard /wp-admin3.06 ▲0.0153.76 ▲2.75
Posts /wp-admin/edit.php3.11 ▲0.0152.90 ▲1.44
Add New Post /wp-admin/post-new.php5.42 ▼0.0197.41 ▼567.43
Media Library /wp-admin/upload.php3.00 ▲0.0036.56 ▲2.06

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, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Deregister Contact Form 7
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲13115.86 ▲0.1910.71 ▲0.3256.63 ▼1.77
Dashboard /wp-admin2,992 ▲586.12 ▲0.15147.15 ▼6.47118.27 ▲0.71
Posts /wp-admin/edit.php2,739 ▲32.72 ▲0.0171.18 ▲0.9799.33 ▲3.40
Add New Post /wp-admin/post-new.php1,683 ▼1,96718.39 ▲3.39391.58 ▼94.68113.67 ▼12.09
Media Library /wp-admin/upload.php1,810 ▲35.03 ▲0.01148.98 ▼7.92125.87 ▼4.36

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

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
The following issues need your attention
  • 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/deregister-contact-form-7/index.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: javascript, contact form, contact form 7, css, form...

deregister-contact-form-7/index.php 85% from 13 tests

The primary PHP file in "Deregister Contact Form 7" version 1.0.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 250 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("deregister-contact-form-7.php" instead of "index.php")

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
Success! There were no dangerous files found in this plugin10 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1102310

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin