78% trashmail-contact-me

Code Review | TrashMail Contact Me

WordPress plugin TrashMail Contact Me scored78%from 54 tests.

About plugin

  • Plugin page: trashmail-contact-me
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9
  • WordPress version: 6.3.1
  • First release: Nov 23, 2017
  • Latest release: Jan 11, 2018
  • Number of updates: 7
  • Update frequency: every 7.7 days
  • Top authors: Dreamsorcerer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /587 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.10MB] [CPU: ▼11.90ms] Passed 4 tests

A check of server-side resources used by TrashMail Contact Me
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1043.39 ▼0.07
Dashboard /wp-admin3.41 ▲0.0749.91 ▼17.80
Posts /wp-admin/edit.php3.53 ▲0.1750.76 ▲0.50
Add New Post /wp-admin/post-new.php5.99 ▲0.1193.95 ▼30.23
Media Library /wp-admin/upload.php3.34 ▲0.1138.86 ▲1.61
TrashMail Options /wp-admin/options-general.php?page=tm-contact-me3.2832.66

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

TrashMail Contact Me: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.53 ▼1.152.00 ▼0.1139.72 ▼4.55
Dashboard /wp-admin2,210 ▲225.85 ▲0.99112.46 ▼6.4542.37 ▼0.03
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0237.08 ▼2.4031.56 ▼4.44
Add New Post /wp-admin/post-new.php1,538 ▲2423.20 ▲5.52646.92 ▲10.4353.02 ▼3.13
Media Library /wp-admin/upload.php1,395 ▲44.22 ▼0.01104.18 ▼0.6342.82 ▼3.17
TrashMail Options /wp-admin/options-general.php?page=tm-contact-me1,0492.0327.2328.65

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 33 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=tm-contact-me
    • > Notice in wp-content/plugins/trashmail-contact-me/trashmail-contact-me.php+193
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=tm-contact-me
    • > Warning in wp-content/plugins/trashmail-contact-me/trashmail-contact-me.php+85
    array_keys() expects parameter 1 to be array, null given
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=tm-contact-me
    • > Warning in wp-content/plugins/trashmail-contact-me/trashmail-contact-me.php+120
    Invalid argument supplied for foreach()

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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/trashmail-contact-me/trashmail-contact-me.php:57

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 97% 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:
  • Plugin Name: You should set the name of your plugin on the first line ( === trashmail-contact-me === )
Please take inspiration from this readme.txt

trashmail-contact-me/trashmail-contact-me.php Passed 13 tests

The principal PHP file in "TrashMail Contact Me" v. 1.2 is loaded by WordPress automatically on each request
62 characters long description:
Generate unique disposable contact addresses for each visitor.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin392 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15029372
JavaScript15020

PHP code Passed 2 tests

This is a short overview 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.14
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%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin