83% reinerouge-contact-form-7

Code Review | ReineRouge - Contact Form 7

WordPress plugin ReineRouge - Contact Form 7 scored83%from 54 tests.

About plugin

  • Plugin page: reinerouge-contac...
  • Plugin version: 1.4.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.1
  • WordPress version: 6.3.1
  • First release: Aug 26, 2022
  • Latest release: Nov 8, 2022
  • Number of updates: 3
  • Update frequency: every 25.7 days
  • Top authors: tousleshoraires (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /551 total downloads

Benchmarks

Plugin footprint 83% from 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: ▼6.48ms] Passed 4 tests

A check of server-side resources used by ReineRouge - Contact Form 7
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.36 ▼4.55
Dashboard /wp-admin3.33 ▲0.0248.11 ▼3.31
Posts /wp-admin/edit.php3.38 ▲0.0251.19 ▼0.30
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.42 ▼17.32
Media Library /wp-admin/upload.php3.25 ▲0.0236.73 ▼0.73

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by ReineRouge - Contact Form 7
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲7214.28 ▼0.011.89 ▲0.2144.39 ▲1.33
Dashboard /wp-admin2,214 ▲435.55 ▼0.1283.19 ▼12.0441.88 ▼0.56
Posts /wp-admin/edit.php2,122 ▲222.00 ▲0.0240.03 ▲0.8936.36 ▼0.64
Add New Post /wp-admin/post-new.php1,540 ▲1223.47 ▲0.41696.17 ▲8.9360.95 ▲1.28
Media Library /wp-admin/upload.php1,422 ▲224.21 ▲0.0299.40 ▼13.3047.98 ▼2.71

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/reinerouge-contact-form-7/src/Admin/Menu.php
    • > /wp-content/plugins/reinerouge-contact-form-7/src/Admin/Pages/Main_Page.php
    • > /wp-content/plugins/reinerouge-contact-form-7/src/Admin/Pages/Download_Page.php
    • > /wp-content/plugins/reinerouge-contact-form-7/src/Admin/Pages/Abstract_Page.php
    • > /wp-content/plugins/reinerouge-contact-form-7/src/Admin/Utils/Response.php

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)
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === reinerouge-contact-form-7 === )
The official readme.txt is a good inspiration

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

"ReineRouge - Contact Form 7" version 1.4.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("reinerouge-contact-form-7.php" instead of "contact-form-reinerouge.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
There were no executable files found in this plugin1,280 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP11179223727
Markdown11210553

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity10.50
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity3.89
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes550.00%
Methods29
▷ Static methods310.34%
▷ Public methods2172.41%
▷ Protected methods00.00%
▷ Private methods827.59%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants18
▷ Global constants00.00%
▷ Class constants18100.00%
▷ Public constants18100.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
2 PNG files occupy 0.25MB with 0.16MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icon-256x256.png20.41KB8.05KB▼ 60.56%
banner-772x250.png235.82KB74.68KB▼ 68.33%