83% secure-message

Code Review | single-use message

WordPress plugin single-use message scored83%from 54 tests.

About plugin

  • Plugin page: secure-message
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Nov 21, 2017
  • Latest release: Nov 21, 2017
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: ntd3004 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /496 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼6.35ms] Passed 4 tests

Analyzing server-side resources used by single-use message
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.39 ▼0.32
Dashboard /wp-admin3.36 ▲0.0649.62 ▼12.83
Posts /wp-admin/edit.php3.47 ▲0.1253.68 ▲1.19
Add New Post /wp-admin/post-new.php5.94 ▲0.0587.48 ▼13.45
Media Library /wp-admin/upload.php3.28 ▲0.0636.95 ▲3.25

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

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

Browser metrics Passed 4 tests

single-use message: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,895 ▲14913.59 ▼0.798.21 ▲6.3545.12 ▲1.61
Dashboard /wp-admin2,225 ▲375.85 ▲0.96101.94 ▼15.1041.61 ▼1.89
Posts /wp-admin/edit.php2,105 ▲132.00 ▼0.0140.91 ▲2.1336.82 ▼0.02
Add New Post /wp-admin/post-new.php1,555 ▲3618.29 ▼4.82636.51 ▼42.7459.55 ▲3.47
Media Library /wp-admin/upload.php1,404 ▲164.19 ▼0.0395.99 ▼7.5447.23 ▼1.27

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/secure-message/ntd-securemessage.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/secure-message/includes/shortcodes.php:124
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/secure-message/includes/settings.php:106

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (/screenshots/screenshot1.png), #2 (/screenshots/screenshot2.png), #3 (/screenshots/screenshot3.png), #4 (/screenshots/screenshot4.png), #5 (/screenshots/screenshot5.png), #6 (/screenshots/screenshot6.png), #7 (/screenshots/screenshot7.png)
The official readme.txt might help

secure-message/ntd-securemessage.php 92% from 13 tests

This is the main PHP file of "single-use message" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("secure-message.php" instead of "ntd-securemessage.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected364 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP57338364

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity3.50
▷ Minimum class complexity2.00
▷ Maximum class complexity5.00
Average method complexity1.56
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 1.62MB with 1.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshots/screenshot6.png482.66KB125.24KB▼ 74.05%
screenshots/screenshot5.png480.59KB127.47KB▼ 73.48%
screenshots/screenshot7.png47.36KB22.27KB▼ 52.98%
screenshots/screenshot3.png81.40KB36.56KB▼ 55.09%
screenshots/screenshot2.png43.58KB19.74KB▼ 54.71%