84% gamipress-conditional-emails-recipients

Code Review | GamiPress - Conditional Emails Recipients

WordPress plugin GamiPress - Conditional Emails Recipients scored84%from 54 tests.

About plugin

  • Plugin page: gamipress-conditi...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Jun 24, 2019
  • Latest release: Sep 4, 2023
  • Number of updates: 16
  • Update frequency: every 96.0 days
  • Top authors: rubengc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,163 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼11.30ms] Passed 4 tests

An overview of server-side resources used by GamiPress - Conditional Emails Recipients
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.41 ▲0.02
Dashboard /wp-admin3.31 ▲0.0146.94 ▼6.91
Posts /wp-admin/edit.php3.36 ▲0.0146.44 ▼14.77
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.50 ▼23.55
Media Library /wp-admin/upload.php3.23 ▲0.0136.11 ▲2.07

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for GamiPress - Conditional Emails Recipients
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲7413.23 ▼1.172.05 ▲0.0644.74 ▼0.90
Dashboard /wp-admin2,229 ▲414.88 ▲0.02104.68 ▼7.8342.91 ▼0.11
Posts /wp-admin/edit.php2,106 ▲172.01 ▼0.0037.11 ▲2.0635.31 ▼0.02
Add New Post /wp-admin/post-new.php1,557 ▲3822.99 ▼0.37675.63 ▲18.3355.78 ▲2.10
Media Library /wp-admin/upload.php1,408 ▲204.24 ▲0.0198.15 ▼8.3343.50 ▲1.36

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gamipress-conditional-emails-recipients/gamipress-conditional-emails-recipients.php:217

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt is a good inspiration

gamipress-conditional-emails-recipients/gamipress-conditional-emails-recipients.php Passed 13 tests

The main PHP script in "GamiPress - Conditional Emails Recipients" version 1.0.1 is automatically included on every request by WordPress
44 characters long description:
Add custom recipients on conditional emails.

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
There were no executable files found in this plugin130 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP363135130

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods9
▷ Static methods111.11%
▷ Public methods555.56%
▷ Protected methods00.00%
▷ Private methods444.44%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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