68% weeve-official-integration

Code Review | Weeve Official Integration

WordPress plugin Weeve Official Integration scored68%from 54 tests.

About plugin

  • Plugin page: weeve-official-in...
  • Plugin version: 1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.8.2
  • WordPress version: 6.3.1
  • First release: Oct 19, 2021
  • Latest release: Dec 5, 2021
  • Number of updates: 3
  • Update frequency: every 17.7 days
  • Top authors: weeve (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /288 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼7.90ms] Passed 4 tests

Server-side resources used by Weeve Official Integration
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1843.78 ▲5.37
Dashboard /wp-admin3.48 ▲0.1346.03 ▼15.97
Posts /wp-admin/edit.php3.59 ▲0.2350.85 ▲2.82
Add New Post /wp-admin/post-new.php6.06 ▲0.1782.87 ▼19.30
Media Library /wp-admin/upload.php3.40 ▲0.1738.15 ▲0.86
Settings /wp-admin/admin.php?page=wpm_points3.3832.62
Vouchers /wp-admin/admin.php?page=wpm_points_vouchers3.3828.89

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: 1 new table, 7 new options
New tables
wp_wpm_rewards_points
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
wpm_points_settings
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Weeve Official Integration
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲15613.50 ▼0.748.87 ▲7.2342.00 ▲2.57
Dashboard /wp-admin2,222 ▲425.53 ▼0.1181.26 ▼7.3240.31 ▲4.12
Posts /wp-admin/edit.php2,127 ▲272.03 ▲0.0140.17 ▲0.4238.77 ▲1.03
Add New Post /wp-admin/post-new.php1,562 ▲3618.43 ▼5.34593.35 ▼112.6349.47 ▼6.05
Media Library /wp-admin/upload.php1,421 ▲214.19 ▲0.0894.85 ▼24.3641.60 ▼7.26
Settings /wp-admin/admin.php?page=wpm_points9871.8923.8227.43
Vouchers /wp-admin/admin.php?page=wpm_points_vouchers8861.9922.7723.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_wpm_rewards_points
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • wpm_points_settings
    • theysaidso_admin_options

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
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/weeve-official-integration/templates/profile_history.php
    • > /wp-content/plugins/weeve-official-integration/templates/vouchers_page.php
    • > /wp-content/plugins/weeve-official-integration/templates/settings_page.php
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: user_history in wp-content/plugins/weeve-official-integration/templates/profile_history.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/weeve-official-integration/templates/ajax_get_points.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/weeve-official-integration/wpm-weeve.php:43
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/weeve-official-integration/templates/profile_history.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/weeve-official-integration/templates/user_rewards_dashboard.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/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 undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (General Settings), #2 (Vouchers Settings)
The official readme.txt might help

weeve-official-integration/wpm-weeve.php 85% from 13 tests

The main PHP file in "Weeve Official Integration" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("weeve-official-integration.php" instead of "wpm-weeve.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,320 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP61901571,039
CSS1311205
JavaScript111076

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity101.00
▷ Minimum class complexity101.00
▷ Maximum class complexity101.00
Average method complexity5.76
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods22
▷ Static methods14.55%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
templates/assets/img/sensei.png1.76KB1.89KB0.00%
templates/assets/img/pro.png0.88KB0.96KB0.00%