89% serial-number-for-contact-form-7

Code Review | Serial Number for Contact Form 7

WordPress plugin Serial Number for Contact Form 7 scored89%from 54 tests.

About plugin

  • Plugin page: serial-number-for...
  • Plugin version: 2.4.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.2
  • WordPress version: 6.3.1
  • First release: Jul 13, 2022
  • Latest release: Jun 20, 2023
  • Number of updates: 33
  • Update frequency: every 10.4 days
  • Top authors: nobuntu87 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

700+ active /3,888 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼1.72ms] Passed 4 tests

Analyzing server-side resources used by Serial Number for Contact Form 7
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0341.52 ▲1.43
Dashboard /wp-admin3.44 ▲0.1350.83 ▼1.86
Posts /wp-admin/edit.php3.49 ▲0.1349.43 ▲1.72
Add New Post /wp-admin/post-new.php5.97 ▲0.0987.44 ▼5.93
Media Library /wp-admin/upload.php3.30 ▲0.0741.87 ▼0.50
Serial Number Settings /wp-admin/admin.php?page=nt-wpcf7sn3.2739.26

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 30 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
nt_wpcf7sn_conf

Browser metrics Passed 4 tests

Checking browser requirements for Serial Number for Contact Form 7
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2914.35 ▼0.401.81 ▼0.4443.57 ▼1.29
Dashboard /wp-admin2,215 ▲385.64 ▼0.0592.65 ▲2.5138.74 ▼6.64
Posts /wp-admin/edit.php2,129 ▲291.99 ▼0.0336.24 ▼1.7638.28 ▲5.33
Add New Post /wp-admin/post-new.php1,389 ▼14917.49 ▼5.59602.16 ▼34.3735.15 ▼16.17
Media Library /wp-admin/upload.php1,426 ▲264.16 ▲0.0399.67 ▼14.0339.99 ▼2.54
Serial Number Settings /wp-admin/admin.php?page=nt-wpcf7sn8022.0024.8928.23

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% 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 to be fixed: The official readme.txt is a good inspiration

serial-number-for-contact-form-7/wpcf7-serial-number.php 85% from 13 tests

The principal PHP file in "Serial Number for Contact Form 7" v. 2.4.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("serial-number-for-contact-form-7.php" instead of "wpcf7-serial-number.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")

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 detected3,507 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP231,2092,3753,041
CSS2143129440
JavaScript14926

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity23.77
▷ Minimum class complexity4.00
▷ Maximum class complexity160.00
Average method complexity2.95
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes13
▷ Abstract classes17.69%
▷ Concrete classes1292.31%
▷ Final classes00.00%
Methods152
▷ Static methods8555.92%
▷ Public methods6744.08%
▷ Protected methods3925.66%
▷ Private methods4630.26%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants41
▷ Global constants3073.17%
▷ Class constants1126.83%
▷ 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