10% psmailer

Code Review | Psmailer

WordPress plugin Psmailer scored 10% from 54 tests.

About plugin

  • Plugin page: psmailer
  • Plugin version: 3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.4
  • WordPress version: 6.3.1
  • First release: Apr 26, 2016
  • Latest release: Apr 27, 2016
  • Number of updates: 31
  • Update frequency: every 1.9 days
  • Top authors: rjjuser (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,023 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/psmailer/psmailer_widget.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; psmailer_widget has a deprecated constructor

Server metrics [RAM: ▼1.89MB] [CPU: ▼58.17ms] Passed 4 tests

This is a short check of server-side resources used by Psmailer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.364.65 ▼45.44
Dashboard /wp-admin2.12 ▼1.187.50 ▼41.58
Posts /wp-admin/edit.php2.12 ▼1.245.85 ▼45.01
Add New Post /wp-admin/post-new.php2.12 ▼3.776.39 ▼100.66
Media Library /wp-admin/upload.php2.12 ▼1.116.56 ▼30.47

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_psmailer-widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Psmailer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4513.22 ▼1.161.64 ▼0.3238.89 ▼10.24
Dashboard /wp-admin2,209 ▲244.89 ▲0.01110.59 ▲8.2739.63 ▲0.17
Posts /wp-admin/edit.php2,089 ▼32.06 ▲0.0838.91 ▼1.9435.13 ▲1.83
Add New Post /wp-admin/post-new.php1,519 ▼023.41 ▲2.32660.93 ▲0.2157.85 ▲13.82
Media Library /wp-admin/upload.php1,382 ▼64.24 ▲0.0395.26 ▼10.8042.60 ▲1.48

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/psmailer/psmailer_widget.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; psmailer_widget has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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 return non-empty strings:
    • > /wp-content/plugins/psmailer/psmailer_settings.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/psmailer/psmailer_widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/psmailer/psmailer_main.php:145

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
10 plugin tags: email, subscribe, form, sidebar, honeypot...

psmailer/psmailer_settings.php 69% from 13 tests

Analyzing the main PHP file in "Psmailer" version 3.4
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("translation")
  • Domain Path: Prefix the domain path with a forward slash character ("/translation")
  • Main file name: The principal plugin file should be the same as the plugin slug ("psmailer.php" instead of "psmailer_settings.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin214 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP46540194
CSS110611
XML2008
HTML1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
PNG images were not found in this plugin