10% user-verification-and-discounts

Code Review | User Verification and Discounts

WordPress plugin User Verification and Discounts scored10%from 54 tests.

About plugin

  • Plugin page: user-verification...
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 22, 2023
  • Latest release: Sep 4, 2023
  • Number of updates: 5
  • Update frequency: every 2.6 days
  • Top authors: ajanuszkiewicz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /126 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/user-verification-and-discounts/buttons.php+6
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.10MB] [CPU: ▼9.65ms] Passed 4 tests

Server-side resources used by User Verification and Discounts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1141.72 ▼2.15
Dashboard /wp-admin3.42 ▲0.0750.46 ▼11.95
Posts /wp-admin/edit.php3.54 ▲0.1847.11 ▼9.08
Add New Post /wp-admin/post-new.php6.00 ▲0.1189.73 ▼11.86
Media Library /wp-admin/upload.php3.35 ▲0.1137.57 ▼5.72
User Verification & Discounts /wp-admin/options-general.php?page=user-verification-and-discounts3.3131.45

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
uvd-plugin-settings
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by User Verification and Discounts
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.28 ▲0.131.86 ▲0.1139.62 ▼1.57
Dashboard /wp-admin2,206 ▲295.64 ▲0.1184.18 ▼9.3740.94 ▼4.16
Posts /wp-admin/edit.php2,108 ▲52.03 ▲0.0337.18 ▼1.1235.71 ▼5.67
Add New Post /wp-admin/post-new.php1,533 ▲523.22 ▲0.46724.21 ▲46.1360.37 ▼1.50
Media Library /wp-admin/upload.php1,399 ▲24.13 ▼0.07100.57 ▼6.9941.89 ▼5.42
User Verification & Discounts /wp-admin/options-general.php?page=user-verification-and-discounts7872.1925.6326.18

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/user-verification-and-discounts/settings.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/user-verification-and-discounts/buttons.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: academic, woocommerce, discount, students, verification...

user-verification-and-discounts/user-verification-and-discounts.php 92% from 13 tests

The primary PHP file in "User Verification and Discounts" version 1.0.3 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin16,389 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JSON20015,709
PHP4195242636
JavaScript25540
CSS1004

PHP code Passed 2 tests

A brief analysis 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.26
Average class complexity3.50
▷ Minimum class complexity2.00
▷ Maximum class complexity5.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions29
▷ Named functions29100.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
There are no PNG files in this plugin