84% secret-messenger

Code Review | Secret Messenger

WordPress plugin Secret Messenger scored 84% from 54 tests.

About plugin

  • Plugin page: secret-messenger
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.9.4
  • WordPress version: 6.3.1
  • First release: Sep 21, 2015
  • Latest release: Mar 3, 2018
  • Number of updates: 3
  • Update frequency: every 298.0 days
  • Top authors: beek.yoshida (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 649 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.38ms] Passed 4 tests

An overview of server-side resources used by Secret Messenger
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.96 ▼2.25
Dashboard /wp-admin3.32 ▲0.0247.07 ▼5.28
Posts /wp-admin/edit.php3.37 ▲0.0251.15 ▲4.07
Add New Post /wp-admin/post-new.php5.90 ▲0.0285.77 ▼10.42
Media Library /wp-admin/upload.php3.25 ▲0.0234.82 ▲0.42
Secret Messenger /wp-admin/plugins.php?page=secret-messenger/secret-messenger.php3.3130.66

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Secret Messenger
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.56 ▼0.821.68 ▼0.1942.73 ▼6.36
Dashboard /wp-admin2,207 ▲195.80 ▲0.9398.21 ▼17.5038.99 ▼10.36
Posts /wp-admin/edit.php2,096 ▲102.05 ▲0.0739.10 ▼0.5835.23 ▲1.31
Add New Post /wp-admin/post-new.php1,531 ▲1123.30 ▲0.06642.51 ▼26.3852.26 ▼11.66
Media Library /wp-admin/upload.php1,395 ▲74.20 ▼0.0195.89 ▼5.9442.62 ▼2.40
Secret Messenger /wp-admin/plugins.php?page=secret-messenger/secret-messenger.php7922.0225.2325.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/secret-messenger/secret-messenger.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: message, plugin, secret

secret-messenger/secret-messenger.php Passed 13 tests

The main PHP file in "Secret Messenger" ver. 0.1.1 adds more information about the plugin and also serves as the entry point for this plugin
50 characters long description:
Add secret message in html source in your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin109 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1212358
PO File1131451

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.00%
Functions2
▷ Named functions2100.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
No PNG images were found in this plugin