84% moneypenny-live-chat

Code Review | Moneypenny Live Chat

WordPress plugin Moneypenny Live Chat scored 84% from 54 tests.

About plugin

  • Plugin page: moneypenny-live-chat
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.5
  • WordPress version: 6.3.1
  • First release: Apr 11, 2018
  • Latest release: Apr 11, 2018
  • Number of updates: 12
  • Update frequency: every 0.5 days
  • Top authors: mpenny (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 745 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.03MB] [CPU: ▼5.95ms] Passed 4 tests

This is a short check of server-side resources used by Moneypenny Live Chat
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.83 ▼5.12
Dashboard /wp-admin3.34 ▲0.0353.91 ▼14.25
Posts /wp-admin/edit.php3.39 ▲0.0353.13 ▼0.73
Add New Post /wp-admin/post-new.php5.92 ▲0.0391.98 ▼3.68
Media Library /wp-admin/upload.php3.26 ▲0.0340.51 ▲4.42

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Moneypenny Live Chat: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2613.24 ▼0.061.60 ▼0.3245.26 ▲2.79
Dashboard /wp-admin2,224 ▲155.85 ▲0.82107.19 ▲2.2270.39 ▲23.02
Posts /wp-admin/edit.php2,107 ▲182.02 ▼0.0237.26 ▼3.3735.39 ▼0.82
Add New Post /wp-admin/post-new.php1,558 ▲1624.10 ▲5.95733.14 ▲65.9451.10 ▼1.73
Media Library /wp-admin/upload.php1,394 ▲124.20 ▼0.04102.19 ▲3.5970.61 ▲26.49

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

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

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
Everything seems fine, however this is by no means an exhaustive test

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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/moneypenny-live-chat/mp-livechat.php:180

User-side errors Passed 1 test

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

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
Attributes that require attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === moneypenny-live-chat === )
The official readme.txt might help

moneypenny-live-chat/mp-livechat.php 92% from 13 tests

The entry point to "Moneypenny Live Chat" version 1.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("moneypenny-live-chat.php" instead of "mp-livechat.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected128 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12244128

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/bird.png2.73KB1.21KB▼ 55.54%
img/moneypenny.png7.38KB3.48KB▼ 52.79%