78% secure-messaging

Code Review | Secure Messaging

WordPress plugin Secure Messaging scored78%from 54 tests.

About plugin

  • Plugin page: secure-messaging
  • Plugin version: 0.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.3-4.9.1
  • WordPress version: 6.3.1
  • First release: Jul 30, 2017
  • Latest release: Dec 30, 2017
  • Number of updates: 5
  • Update frequency: every 56.6 days
  • Top authors: ericmann (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,516 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼7.99ms] Passed 4 tests

Analyzing server-side resources used by Secure Messaging
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1135.63 ▼6.93
Dashboard /wp-admin3.41 ▲0.0644.68 ▼14.49
Posts /wp-admin/edit.php3.52 ▲0.1643.17 ▼2.91
Add New Post /wp-admin/post-new.php5.99 ▲0.1080.87 ▼7.63
Media Library /wp-admin/upload.php3.33 ▲0.1037.39 ▲6.56

Server storage [IO: ▲2.36MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
It is recommended to fix the following issues
  • You have illegally modified 4 files (7.56KB) outside of "wp-content/plugins/secure-messaging/" and "wp-content/uploads/"
    • (new file) wp-content/.gpg/pubring.kbx~
    • (new file) wp-content/.gpg/private-keys-v1.d/.empty
    • (new file) wp-content/.gpg/random_seed
    • (new file) wp-content/.gpg/pubring.kbx
Filesystem: 193 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Secure Messaging
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.26 ▼1.121.77 ▼0.5844.26 ▼0.31
Dashboard /wp-admin2,209 ▲215.84 ▲0.9497.33 ▼19.7038.05 ▼8.77
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0536.55 ▼0.6333.00 ▼4.13
Add New Post /wp-admin/post-new.php1,533 ▲1923.38 ▲5.95682.48 ▼20.0057.43 ▲4.97
Media Library /wp-admin/upload.php1,388 ▲94.24 ▲0.10111.06 ▲6.0747.24 ▼0.07

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/secure-messaging/vendor/pear/console_commandline/tests/AllTests.php
    • > /wp-content/plugins/secure-messaging/vendor/pear/crypt_gpg/tools/build-keyring.php
    • > /wp-content/plugins/secure-messaging/vendor/pear/crypt_gpg/tools/dump-keyring.php
  • 146× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      require_once(Console/CommandLine/Action.php): failed to open stream: No such file or directory in wp-content/plugins/secure-messaging/vendor/pear/console_commandline/Console/CommandLine/Action/List.php on line 28
    • > PHP Warning
      require_once(Crypt/GPG.php): failed to open stream: No such file or directory in wp-content/plugins/secure-messaging/vendor/pear/crypt_gpg/tests/TestCase.php on line 40
    • > PHP Fatal error
      require_once(): Failed opening required 'Console/CommandLine.php' (include_path='.:/usr/share/php') in wp-content/plugins/secure-messaging/vendor/pear/console_commandline/docs/examples/ex3.php on line 27
    • > PHP Warning
      file_get_contents(/encrypted-data-missing-key.asc): failed to open stream: No such file or directory in wp-content/plugins/secure-messaging/vendor/pear/crypt_gpg/tools/build-keyring.php on line 101
    • > PHP Warning
      require_once(Crypt/GPGAbstract.php): failed to open stream: No such file or directory in wp-content/plugins/secure-messaging/vendor/pear/crypt_gpg/Crypt/GPG.php on line 60
    • > PHP Fatal error
      require_once(): Failed opening required 'Console/CommandLine.php' (include_path='.:/usr/share/php') in wp-content/plugins/secure-messaging/vendor/pear/console_commandline/docs/examples/ex4.php on line 28
    • > PHP Fatal error
      require_once(): Failed opening required 'Crypt/GPG.php' (include_path='.:/usr/share/php') in wp-content/plugins/secure-messaging/vendor/pear/crypt_gpg/tests/TestCase.php on line 40
    • > PHP Warning
      require_once(Console/CommandLine.php): failed to open stream: No such file or directory in wp-content/plugins/secure-messaging/vendor/pear/console_commandline/docs/examples/ex1.php on line 29
    • > PHP Warning
      require_once(Console/CommandLine/Action.php): failed to open stream: No such file or directory in wp-content/plugins/secure-messaging/vendor/pear/console_commandline/Console/CommandLine/Action/StoreTrue.php on line 28
    • > PHP Fatal error
      require_once(): Failed opening required 'Crypt/GPG.php' (include_path='.:/usr/share/php') in wp-content/plugins/secure-messaging/vendor/pear/crypt_gpg/tests/TestCase.php on line 40

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: pgp, gpg, security

secure-messaging/secure-messaging.php 92% from 13 tests

The main PHP script in "Secure Messaging" version 0.4.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 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
No dangerous file extensions were detected16,729 lines of code in 162 files:
LanguageFilesBlank linesComment linesLines of code
PHP1403,71011,59714,738
XML1038201,310
JSON400312
Bourne Shell14044197
Markdown217055
PO File16643
reStructuredText113042
YAML30032

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.21
Average class complexity13.23
▷ Minimum class complexity1.00
▷ Maximum class complexity148.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces2
Interfaces4
Traits0
Classes77
▷ Abstract classes45.19%
▷ Concrete classes7394.81%
▷ Final classes00.00%
Methods652
▷ Static methods243.68%
▷ Public methods56686.81%
▷ Protected methods588.90%
▷ Private methods284.29%
Functions17
▷ Named functions1588.24%
▷ Anonymous functions211.76%
Constants63
▷ Global constants69.52%
▷ Class constants5790.48%
▷ Public constants57100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin