73% campation-postoffice

Code Review | Send Emails without SMTP - Campation PostOffice

WordPress plugin Send Emails without SMTP - Campation PostOffice scored 73% from 54 tests.

About plugin

  • Plugin page: campation-postoffice
  • Plugin version: 1.2.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.9.2
  • WordPress version: 5.9.2
  • First release: Feb 4, 2022
  • Latest release: Mar 17, 2022
  • Number of updates: 48
  • Update frequency: every 0.8 days
  • Top authors: campation (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 480 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲5.67MB] [CPU: ▼278.43ms] 75% from 4 tests

Analyzing server-side resources used by Send Emails without SMTP - Campation PostOffice
Please fix the following
  • Extra RAM: Extra memory usage should kept under 5MB (currently 5.67MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.18 ▲5.6785.73 ▲34.44
Dashboard /wp-admin9.17 ▲5.7666.44 ▲31.41
Posts /wp-admin/edit.php9.31 ▲5.6769.42 ▲31.72
Add New Post /wp-admin/post-new.php12.56 ▲5.59133.63 ▼1,199.39
Media Library /wp-admin/upload.php9.17 ▲5.8752.50 ▲22.56
Freemius Debug [v.2.5.0.1] /wp-admin/admin.php?page=freemius9.2255.47

Server storage [IO: ▲12.02MB] [DB: ▲0.05MB] Passed 3 tests

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 600 new files
Database: 17 new tables, 59 new options
New tables
wp_cptn_po_dmarc_report
wp_cptn_po_mailserver_mxdomain
wp_cptn_po_queue
wp_cptn_po_mailserver
wp_cptn_po_plugin_mailcategory
wp_cptn_po_option
wp_cptn_po_sender_domain
wp_cptn_po_sender_domain_mailserver
wp_cptn_po_dmarc_record
wp_cptn_po_dmarc_result
...
New WordPress options
cptn_po_opt_recipient_switch_nomx
cptn_opt_automation_days
cptn_po_opt_recipient_switch_malf
cptn_po_scret_key
fs_accounts
cptn_po_opt_cockpit_switch_general
cptn_po_opt_envelope_account_port
cptn_po_opt_recipient_switch_ok
cptn_po_opt_envelope_account_password
cptn_opt_timezone_server
...

Browser metrics Passed 4 tests

Checking browser requirements for Send Emails without SMTP - Campation PostOffice
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,907 ▼81515.37 ▼0.282.19 ▼4.062.18 ▼0.06
Dashboard /wp-admin2,130 ▼7315.88 ▼0.2893.09 ▼41.37213.86 ▲53.13
Posts /wp-admin/edit.php2,085 ▼6032.90 ▼0.3334.40 ▼28.25180.26 ▲42.61
Add New Post /wp-admin/post-new.php1,701 ▲1121.18 ▲0.70412.61 ▼22.84172.60 ▲9.78
Media Library /wp-admin/upload.php1,441 ▼2545.49 ▲0.0396.77 ▼44.50255.53 ▲63.87
Freemius Debug [v.2.5.0.1] /wp-admin/admin.php?page=freemius1,0472.3725.94134.79

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/campation-postoffice/freemius/includes/class-freemius.php+8911
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 4 options in the database
    • fs_debug_mode
    • fs_gdpr
    • fs_active_plugins
    • fs_accounts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 114× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Net_DNS2_RR' not found in wp-content/plugins/campation-postoffice/includes/Net/DNS2/RR/EUI64.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Net_DNS2_RR' not found in wp-content/plugins/campation-postoffice/includes/Net/DNS2/RR/WKS.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/campation-postoffice/backend/assets/ajax/domains-ajax.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/campation-postoffice/includes/cptn-po-wp-mail.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Net_DNS2_RR' not found in wp-content/plugins/campation-postoffice/includes/Net/DNS2/RR/NAPTR.php:40
    • > PHP Fatal error
      Uncaught Error: Class 'Net_DNS2_RR' not found in wp-content/plugins/campation-postoffice/includes/Net/DNS2/RR/LOC.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/campation-postoffice/cron/includes/cptn-po-cron-message-slave.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/campation-postoffice/backend/assets/ajax/recipients-ajax.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Net_DNS2_RR' not found in wp-content/plugins/campation-postoffice/includes/Net/DNS2/RR/SSHFP.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'Net_DNS2_RR' not found in wp-content/plugins/campation-postoffice/includes/Net/DNS2/RR/L32.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (13 tag instead of maximum 10)
The official readme.txt might help

campation-postoffice/campation-postoffice.php Passed 13 tests

"Send Emails without SMTP - Campation PostOffice" version 1.2.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
67 characters long description:
The ALL-IN-ONE solution for high-end email - 10 x faster than SMTP!

Code Analysis 97% from 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
Success! There were no dangerous files found in this plugin103,869 lines of code in 490 files:
LanguageFilesBlank linesComment linesLines of code
PHP26412,21626,93055,028
JavaScript1235,13710,25434,779
PO File33,0053,2676,146
CSS813034356,090
SVG463865
LESS42639551
Sass2272134
JSON20080
HTML15770
YAML38057
TypeScript1207325
Markdown18022
XML10022

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,029)
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity40.23
▷ Minimum class complexity1.00
▷ Maximum class complexity3,029.00
Average method complexity4.36
▷ Minimum method complexity1.00
▷ Maximum method complexity89.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes129
▷ Abstract classes32.33%
▷ Concrete classes12697.67%
▷ Final classes00.00%
Methods1,542
▷ Static methods19412.58%
▷ Public methods93660.70%
▷ Protected methods25016.21%
▷ Private methods35623.09%
Functions288
▷ Named functions28398.26%
▷ Anonymous functions51.74%
Constants329
▷ Global constants12537.99%
▷ Class constants20462.01%
▷ Public constants204100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
26 compressed PNG files occupy 0.18MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
backend/vendor/datatables-1.11.3/media/images/sort_both.png0.20KB0.29KB0.00%
backend/vendor/datatables-1.11.3/media/images/sort_asc_disabled.png0.14KB0.25KB0.00%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
img/campation-postoffice-logo-opacity.png7.83KB8.25KB0.00%
img/campation-postoffice-logo.png12.47KB13.19KB0.00%