Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
- The plugin did not install without errors
- > Deprecated in wp-content/plugins/wp-redditjs/widget.php+178
Function create_function() is deprecated
Server metrics [RAM: ▼1.89MB] [CPU: ▼323.06ms] Passed 4 tests
This is a short check of server-side resources used by Reddit Embed
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 1.74 ▼0.98 | 4.83 ▼15.70 |
Dashboard /wp-admin | 1.76 ▼1.29 | 8.79 ▼35.65 |
Posts /wp-admin/edit.php | 1.76 ▼1.34 | 5.68 ▼37.76 |
Add New Post /wp-admin/post-new.php | 1.76 ▼3.67 | 5.38 ▼1,184.63 |
Media Library /wp-admin/upload.php | 1.76 ▼1.24 | 5.31 ▼34.20 |
wp-redditJS /wp-admin/options-general.php?page=wp-redditjs | 1.76 | 5.45 |
Server storage [IO: ▲0.06MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 28 new files
Database: no new tables, 1 new option
New WordPress options |
---|
widget_redditjs_sidebar |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Reddit Embed
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,787 ▲205 | 16.23 ▲0.74 | 12.31 ▲4.74 | 46.85 ▲4.57 |
Dashboard /wp-admin | 2,935 ▲85 | 5.91 ▲0.06 | 144.96 ▲14.11 | 98.78 ▼7.49 |
Posts /wp-admin/edit.php | 2,711 ▲5 | 2.69 ▲0.00 | 66.87 ▲0.49 | 90.60 ▼0.26 |
Add New Post /wp-admin/post-new.php | 1,484 ▼367 | 18.43 ▲0.72 | 344.85 ▼8.04 | 106.77 ▲1.11 |
Media Library /wp-admin/upload.php | 1,777 ▲2 | 4.98 ▼0.02 | 156.69 ▲10.09 | 111.57 ▼7.09 |
wp-redditJS /wp-admin/options-general.php?page=wp-redditjs | 1,162 | 2.34 | 55.60 | 51.01 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
- This plugin cannot be uninstalled
- > Deprecated in wp-content/plugins/wp-redditjs/widget.php+178
Function create_function() is deprecated
- This plugin does not fully uninstall, leaving 1 option in the database
- widget_redditjs_sidebar
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)
Smoke test failed, please fix the following
- > GET request to /wp-admin/options-general.php?page=wp-redditjs
- > Deprecated in wp-content/plugins/wp-redditjs/widget.php+178
Function create_function() is deprecated
- > GET request to /wp-admin/options-general.php?page=wp-redditjs
- > User deprecated in wp-includes/functions.php+5304
The called constructor method for WP_Widget in redditjs_sidebar is deprecated since version 4.3.0! Use __construct() instead.
- > GET request to /wp-admin/options-general.php?page=wp-redditjs
- > Notice in wp-content/plugins/wp-redditjs/admin/views/admin.php+21
Undefined index: hiddenConfirmPost
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 take a closer look at the following
- 1× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/wp-redditjs/public/views/public.php
- 3× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-redditjs/widget.php:3
- > PHP Notice
Undefined index: hiddenConfirmPost in wp-content/plugins/wp-redditjs/admin/views/admin.php on line 21
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-redditjs/admin/views/admin.php:41
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
1 plugin tags: comments
wp-redditjs/wp-redditjs.php Passed 13 tests
The principal PHP file in "Reddit Embed" v. 1.0.0 is loaded by WordPress automatically on each request
11 characters long description:
wp-redditjs
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected563 lines of code in 13 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 8 | 200 | 477 | 447 |
CSS | 2 | 22 | 19 | 82 |
Markdown | 1 | 12 | 0 | 24 |
JavaScript | 2 | 18 | 28 | 10 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.25 |
Average class complexity | 14.00 |
▷ Minimum class complexity | 6.00 |
▷ Maximum class complexity | 21.00 |
Average method complexity | 2.39 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 19.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 3 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 3 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 28 | |
▷ Static methods | 7 | 25.00% |
▷ Public methods | 22 | 78.57% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 6 | 21.43% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 1 | 100.00% |
▷ Public constants | 1 | 100.00% |
Plugin size Passed 1 test
Image compression Passed 1 test
All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected