78% mh-pusher

Code Review | Message Hub

WordPress plugin Message Hub scored78%from 54 tests.

About plugin

  • Plugin page: mh-pusher
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9
  • WordPress version: 6.3.1
  • First release: Sep 8, 2018
  • Latest release: Sep 8, 2018
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: travisnguyen20 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /514 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.09MB] [CPU: ▼8.97ms] Passed 4 tests

Analyzing server-side resources used by Message Hub
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1035.02 ▼7.69
Dashboard /wp-admin3.40 ▲0.0543.02 ▼16.32
Posts /wp-admin/edit.php3.51 ▲0.1543.02 ▼2.60
Add New Post /wp-admin/post-new.php6.00 ▲0.1181.26 ▼9.27
Media Library /wp-admin/upload.php3.32 ▲0.0933.04 ▼0.91
Message Hub /wp-admin/options-general.php?page=message_hub3.2931.40

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
message_hub_api_key
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Message Hub: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲15913.42 ▼1.317.84 ▲6.1039.98 ▼4.06
Dashboard /wp-admin2,200 ▲205.64 ▼0.0381.22 ▼19.8038.89 ▼3.77
Posts /wp-admin/edit.php2,108 ▲52.03 ▲0.0433.22 ▼4.8934.35 ▲4.20
Add New Post /wp-admin/post-new.php1,533 ▲723.43 ▲0.47673.48 ▲2.1474.42 ▲14.22
Media Library /wp-admin/upload.php1,408 ▲84.15 ▼0.0291.52 ▼6.8641.97 ▼5.46
Message Hub /wp-admin/options-general.php?page=message_hub8032.0029.0129.31

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • message_hub_api_key
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/mh-pusher/admin/partials/message-hub-admin-display.php
    • > /wp-content/plugins/mh-pusher/public/partials/message-hub-public-display.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mh-pusher/includes/wpcf7.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mh-pusher/admin/class-message-hub-admin.php:105

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === mh-pusher === )
The official readme.txt is a good inspiration

mh-pusher/message-hub.php 85% from 13 tests

"Message Hub" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("mh-pusher.php" instead of "message-hub.php")

Code Analysis Passed 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 plugin466 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP15198552460
JavaScript24546
CSS2080

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity3.89
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity1.76
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods34
▷ Static methods617.65%
▷ Public methods2573.53%
▷ Protected methods00.00%
▷ Private methods926.47%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
PNG images were not found in this plugin