78% sniperpress-mail

Code Review | SniperPress Mail

WordPress plugin SniperPress Mail scored78%from 54 tests.

About plugin

  • Plugin page: sniperpress-mail
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6.1
  • WordPress version: 6.3.1
  • First release: Sep 20, 2016
  • Latest release: Sep 21, 2016
  • Number of updates: 11
  • Update frequency: every 0.1 days
  • Top authors: luiscordeiro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /516 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.13MB] [CPU: ▼3.03ms] Passed 4 tests

Server-side resources used by SniperPress Mail
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1240.11 ▲2.01
Dashboard /wp-admin3.43 ▲0.1245.82 ▼5.91
Posts /wp-admin/edit.php3.54 ▲0.1849.06 ▲5.83
Add New Post /wp-admin/post-new.php6.03 ▲0.1493.75 ▼9.13
Media Library /wp-admin/upload.php3.35 ▲0.1235.37 ▲0.92
Options /wp-admin/admin.php?page=wpsm-admin3.3229.58
Rules /wp-admin/admin.php?page=wpsm_admin_rules3.3332.97

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for SniperPress Mail
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,941 ▲20613.61 ▼0.838.69 ▲6.7842.75 ▼2.14
Dashboard /wp-admin2,236 ▲625.84 ▲0.96104.64 ▼17.4038.24 ▼9.15
Posts /wp-admin/edit.php2,119 ▲302.05 ▲0.0539.58 ▲4.7635.47 ▼1.17
Add New Post /wp-admin/post-new.php1,551 ▲1818.52 ▼4.36604.28 ▲0.8453.73 ▲4.54
Media Library /wp-admin/upload.php1,424 ▲364.15 ▼0.0699.21 ▼13.5643.64 ▲0.19
Options /wp-admin/admin.php?page=wpsm-admin8172.0325.2627.43
Rules /wp-admin/admin.php?page=wpsm_admin_rules8822.0629.9327.44

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/sniperpress-mail/public/partials/sniperpress-mail-public-display.php
    • > /wp-content/plugins/sniperpress-mail/admin/testes/mailchimp.php
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sniperpress-mail/admin/partials/sniperpress-mail-admin-rules.php:94
    • > PHP Fatal error
      Uncaught Error: Class 'sniperpress_mail_Email_Services' not found in wp-content/plugins/sniperpress-mail/includes/services/class-email-getresponse.php:3
    • > PHP Notice
      Undefined index: wpsm_hooks_ref in wp-content/plugins/sniperpress-mail/admin/partials/sniperpress-mail-admin-rules.php on line 86
    • > PHP Fatal error
      Uncaught Error: Class 'sniperpress_mail_Email_Services' not found in wp-content/plugins/sniperpress-mail/includes/services/class-email-mailchimp.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/sniperpress-mail/admin/partials/sniperpress-mail-admin-display.php:23
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/sniperpress-mail/admin/partials/sniperpress-mail-admin-rules.php on line 86

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
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === sniperpress-mail === )
You can take inspiration from this readme.txt

sniperpress-mail/sniperpress-mail.php Passed 13 tests

The main PHP file in "SniperPress Mail" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
50 characters long description:
Email Marketing Automation With 3rd Party Services

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 plugin659 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP18357698584
JavaScript3276056
CSS231119

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity4.91
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity1.98
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods44
▷ Static methods24.55%
▷ Public methods3886.36%
▷ Protected methods00.00%
▷ Private methods613.64%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin