78% rightmessage

Code Review | RightMessage

WordPress plugin RightMessage scored78%from 54 tests.

About plugin

  • Plugin page: rightmessage
  • Plugin version: 0.9.4
  • PHP compatiblity: 5.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.4
  • WordPress version: 6.3.1
  • First release: Jul 18, 2019
  • Latest release: Jun 18, 2020
  • Number of updates: 10
  • Update frequency: every 33.8 days
  • Top authors: rightmessage (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /16,105 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Server-side resources used by RightMessage
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0339.52 ▼2.08
Dashboard /wp-admin3.37 ▲0.0649.46 ▼2.36
Posts /wp-admin/edit.php3.48 ▲0.1245.54 ▼8.50
Add New Post /wp-admin/post-new.php5.95 ▲0.06104.70 ▲2.55
Media Library /wp-admin/upload.php3.29 ▲0.0638.69 ▲0.15
RightMessage /wp-admin/options-general.php?page=_wp_rightmessage_settings3.2530.62

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
_wp_rightmessage_settings
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for RightMessage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲9514.74 ▲0.442.00 ▲0.2338.78 ▼6.33
Dashboard /wp-admin2,210 ▲224.84 ▼0.97110.16 ▲4.5644.17 ▼1.36
Posts /wp-admin/edit.php2,090 ▼22.04 ▲0.0440.54 ▲2.6436.01 ▲3.26
Add New Post /wp-admin/post-new.php1,516 ▼317.61 ▼5.65612.54 ▼63.8454.49 ▲6.31
Media Library /wp-admin/upload.php1,392 ▲74.16 ▼0.0796.45 ▼21.5340.47 ▼5.29
RightMessage /wp-admin/options-general.php?page=_wp_rightmessage_settings8382.0526.0931.72

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 7 options in the database
    • _wp_rightmessage_settings
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Please fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/rightmessage/views/rm-variables.php
    • > /wp-content/plugins/rightmessage/views/tracking-code.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: account_id in wp-content/plugins/rightmessage/views/tracking-code.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/rightmessage/wp-rightmessage.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'RightMessage_Settings_Base' not found in wp-content/plugins/rightmessage/admin/section/class-rightmessage-settings-general.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% 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 your attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
The official readme.txt might help

rightmessage/wp-rightmessage.php 92% from 13 tests

"RightMessage" version 0.9.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("rightmessage.php" instead of "wp-rightmessage.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 detected323 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP78742323

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity8.25
▷ Minimum class complexity3.00
▷ Maximum class complexity16.00
Average method complexity1.97
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes125.00%
▷ Concrete classes375.00%
▷ Final classes00.00%
Methods32
▷ Static methods1443.75%
▷ Public methods2681.25%
▷ Protected methods00.00%
▷ Private methods618.75%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants466.67%
▷ Class constants233.33%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin