84% loyalty-reward-points-for-hubspot

Code Review | Loyalty Reward Points for HubSpot

WordPress plugin Loyalty Reward Points for HubSpot scored84%from 54 tests.

About plugin

  • Plugin page: loyalty-reward-po...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Oct 27, 2022
  • Latest release: Dec 28, 2022
  • Number of updates: 4
  • Update frequency: every 16.8 days
  • Top authors: makewebbetter (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /236 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.01MB] [CPU: ▼8.78ms] Passed 4 tests

An overview of server-side resources used by Loyalty Reward Points for HubSpot
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.95 ▼4.09
Dashboard /wp-admin3.31 ▼0.0445.82 ▼12.55
Posts /wp-admin/edit.php3.36 ▲0.0046.92 ▲2.38
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.43 ▼16.91
Media Library /wp-admin/upload.php3.23 ▲0.0031.81 ▼1.55

Server storage [IO: ▲0.78MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Loyalty Reward Points for HubSpot
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.31 ▼0.041.70 ▲0.1044.34 ▼0.09
Dashboard /wp-admin2,198 ▲275.77 ▲0.1786.86 ▼6.7736.47 ▼1.26
Posts /wp-admin/edit.php2,100 ▼31.98 ▼0.0138.64 ▲4.1535.89 ▲3.21
Add New Post /wp-admin/post-new.php1,528 ▲222.98 ▼0.52682.52 ▲8.2759.81 ▲2.13
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.0493.20 ▼16.6942.18 ▼2.76

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Loyalty_Reward_Points_For_Hubspot_Admin' not found in wp-content/plugins/loyalty-reward-points-for-hubspot/admin/partials/mwb-pointsandreward.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/loyalty-reward-points-for-hubspot/admin/partials/loyalty-reward-points-for-hubspot-admin-display.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/loyalty-reward-points-for-hubspot/admin/partials/mwb-testingtab.php:17

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Requires php: The plugin version is formatted incorrectly
You can look at the official readme.txt

loyalty-reward-points-for-hubspot/loyalty-reward-points-for-hubspot.php 92% from 13 tests

"Loyalty Reward Points for HubSpot" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 145 characters long)

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
Success! There were no dangerous files found in this plugin8,622 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript32,1061,9527,256
PHP16235736741
CSS11048553
PO File1293572

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity6.50
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity2.02
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods43
▷ Static methods511.63%
▷ Public methods3786.05%
▷ Protected methods00.00%
▷ Private methods613.95%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin