83% better-messages-wcfm-integration

Code Review | Better Messages - WCFM Integration

WordPress plugin Better Messages - WCFM Integration scored83%from 54 tests.

About plugin

  • Plugin page: better-messages-w...
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 16, 2021
  • Latest release: Jul 14, 2023
  • Number of updates: 12
  • Update frequency: every 50.4 days
  • Top authors: wordplus (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /2,853 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.04ms] Passed 4 tests

Analyzing server-side resources used by Better Messages - WCFM Integration
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0046.38 ▲5.71
Dashboard /wp-admin3.31 ▲0.0046.04 ▼1.52
Posts /wp-admin/edit.php3.36 ▲0.0043.27 ▼12.39
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.15 ▼6.30
Media Library /wp-admin/upload.php3.23 ▲0.0033.56 ▲0.07

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 183 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Better Messages - WCFM Integration
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.23 ▼0.201.71 ▼0.0944.02 ▲0.89
Dashboard /wp-admin2,192 ▲155.50 ▼0.1287.44 ▼11.2537.27 ▼6.14
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0034.89 ▼6.3233.39 ▼2.46
Add New Post /wp-admin/post-new.php1,526 ▼223.00 ▼0.07683.38 ▲1.9856.13 ▼2.14
Media Library /wp-admin/upload.php1,400 ▼04.20 ▼0.0196.10 ▼8.6446.23 ▲1.20

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/better-messages-wcfm-integration/views/wcfm-bpbm-messaging.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-messages-wcfm-integration/better-messages-wcfm.php:158

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: messaging, private message, wcfm, chat, messages

better-messages-wcfm-integration/better-messages-wcfm.php 85% from 13 tests

The main PHP script in "Better Messages - WCFM Integration" version 1.0.7 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("better-messages-wcfm-integration.php" instead of "better-messages-wcfm.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin33,794 lines of code in 139 files:
LanguageFilesBlank linesComment linesLines of code
PHP1228,07417,24133,373
Markdown1680214
JavaScript33459194
CSS130013

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity88.22
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.57
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes51
▷ Abstract classes23.92%
▷ Concrete classes4996.08%
▷ Final classes00.00%
Methods1,276
▷ Static methods20015.67%
▷ Public methods88769.51%
▷ Protected methods171.33%
▷ Private methods37229.15%
Functions106
▷ Named functions106100.00%
▷ Anonymous functions00.00%
Constants146
▷ Global constants9967.81%
▷ Class constants4732.19%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
inc/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%