Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
- The plugin cannot be installed
- > Deprecated in wp-includes/class-wp-hook.php+303
Non-static method RHJ4Notifications::activate() should not be called statically
Server metrics [RAM: ▼0.62MB] [CPU: ▼167.87ms] Passed 4 tests
A check of server-side resources used by RHJ4 Notifications
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.97 ▲0.13 | 45.03 ▲12.26 |
Dashboard /wp-admin | 3.03 ▼0.03 | 21.97 ▼21.52 |
Posts /wp-admin/edit.php | 3.03 ▼0.08 | 25.29 ▼12.38 |
Add New Post /wp-admin/post-new.php | 3.03 ▼2.40 | 24.28 ▼630.94 |
Media Library /wp-admin/upload.php | 3.03 ▲0.03 | 25.00 ▼6.63 |
RHJ4 Notifications /wp-admin/options-general.php?page=rhj4_notifications | 3.03 | 24.79 |
Server storage [IO: ▲1.36MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 49 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
Checking browser requirements for RHJ4 Notifications
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,845 ▲249 | 16.54 ▲1.03 | 13.29 ▲5.16 | 54.82 ▲2.58 |
Dashboard /wp-admin | 2,986 ▲55 | 6.11 ▲0.20 | 137.85 ▼7.97 | 124.92 ▲3.83 |
Posts /wp-admin/edit.php | 2,758 ▲19 | 2.73 ▲0.03 | 70.21 ▲6.02 | 91.81 ▼7.36 |
Add New Post /wp-admin/post-new.php | 2,080 ▲476 | 15.90 ▼2.95 | 374.76 ▼19.14 | 109.22 ▼2.83 |
Media Library /wp-admin/upload.php | 1,825 ▲18 | 5.14 ▲0.11 | 167.49 ▲17.50 | 125.55 ▲4.57 |
RHJ4 Notifications /wp-admin/options-general.php?page=rhj4_notifications | 1,132 | 2.39 | 56.85 | 79.73 |
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
These items require your attention
- The plugin did not uninstall gracefully
- > Notice in wp-content/plugins/rhj4-notifications/rhj4_notification_settings.php+59
Trying to access array offset on value of type bool
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
- 17 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=rhj4_notifications
- > Notice in wp-content/plugins/rhj4-notifications/rhj4_notification_settings.php+233
Trying to access array offset on value of type bool
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
Please fix the following items
- 2× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/rhj4-notifications/include/short_demo.php
- > /wp-content/plugins/rhj4-notifications/include/long_demo.php
- 2× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rhj4-notifications/rhj4_notifications.php:1182
- > PHP Fatal error
Uncaught Error: Class 'RHJ4Notifications' not found in wp-content/plugins/rhj4-notifications/include/demo.php:16
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% 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
These attributes need your attention:
- Screenshots: These screenshots do not have images: #1 (Notifications_Demo.png), #2 (This is the second screen shot)
rhj4-notifications/rhj4_notifications.php 92% from 13 tests
The main PHP script in "RHJ4 Notifications" version 1.2 is automatically included on every request by WordPress
You should first fix the following items:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("rhj4-notifications.php" instead of "rhj4_notifications.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected2,801 lines of code in 18 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 8 | 251 | 374 | 1,225 |
JavaScript | 6 | 168 | 385 | 936 |
CSS | 2 | 66 | 46 | 378 |
HTML | 1 | 154 | 38 | 250 |
SQL | 1 | 5 | 14 | 12 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.35 |
Average class complexity | 59.50 |
▷ Minimum class complexity | 11.00 |
▷ Maximum class complexity | 108.00 |
Average method complexity | 3.29 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 26.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 51 | |
▷ Static methods | 1 | 1.96% |
▷ Public methods | 49 | 96.08% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 2 | 3.92% |
Functions | 16 | |
▷ Named functions | 16 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 17 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 17 | 100.00% |
▷ Public constants | 17 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
26 PNG files occupy 0.27MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/Reminder-DateTime-32x32.png | 3.00KB | 1.79KB | ▼ 40.45% |
images/Reminder-16x16.png | 0.61KB | 0.61KB | 0.00% |
images/Information-32x32.png | 1.95KB | 1.67KB | ▼ 14.13% |
images/Tip-32x32.png | 1.45KB | 1.51KB | 0.00% |
assets/Notifications_Demo.png | 124.04KB | 42.56KB | ▼ 65.69% |