Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.06MB] [CPU: ▼2.78ms] Passed 4 tests
Server-side resources used by Simple Alert for Old Post
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.54 ▲0.08 | 42.49 ▲6.27 |
Dashboard /wp-admin | 3.36 ▲0.06 | 46.26 ▼2.11 |
Posts /wp-admin/edit.php | 3.47 ▲0.12 | 47.91 ▼1.87 |
Add New Post /wp-admin/post-new.php | 5.96 ▲0.07 | 99.72 ▼9.55 |
Media Library /wp-admin/upload.php | 3.28 ▲0.05 | 38.07 ▲2.43 |
Alert Settings /wp-admin/options-general.php?page=simple-alert-for-old-post | 3.27 | 33.30 |
Server storage [IO: ▲1.01MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
theysaidso_admin_options |
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-posts |
widget_recent-comments |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Simple Alert for Old Post
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,816 ▲81 | 13.28 ▼0.94 | 1.80 ▲0.01 | 44.32 ▼2.41 |
Dashboard /wp-admin | 2,218 ▲30 | 4.85 ▼0.02 | 111.52 ▲0.35 | 43.12 ▲1.01 |
Posts /wp-admin/edit.php | 2,104 ▲15 | 2.01 ▼0.03 | 41.74 ▲0.59 | 36.90 ▲0.10 |
Add New Post /wp-admin/post-new.php | 1,534 ▼0 | 18.54 ▼4.65 | 601.89 ▼0.82 | 61.42 ▲7.21 |
Media Library /wp-admin/upload.php | 1,400 ▲15 | 4.29 ▲0.06 | 96.06 ▼4.06 | 43.30 ▼14.02 |
Alert Settings /wp-admin/options-general.php?page=simple-alert-for-old-post | 1,001 | 2.18 | 25.26 | 29.52 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-comments
- widget_theysaidso_widget
- theysaidso_admin_options
- can_compress_scripts
- db_upgraded
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
- 1× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/simple-alert-for-old-post/res/views/notice_error.php
- 11× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/simple-alert-for-old-post/res/views/settings_main.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/simple-alert-for-old-post/res/views/notice_update.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-alert-for-old-post/simple-alert-for-old-post.php:14
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/simple-alert-for-old-post/tests/test-admin.php:4
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/simple-alert-for-old-post/res/views/notice_error.php on line 3
- > PHP Notice
Undefined variable: result in wp-content/plugins/simple-alert-for-old-post/res/views/notice_error.php on line 3
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/simple-alert-for-old-post/tests/test-simple-alert-for-old-post.php:4
- > PHP Warning
require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/simple-alert-for-old-post/tests/bootstrap.php on line 8
- > PHP Notice
Trying to get property 'errors' of non-object in wp-content/plugins/simple-alert-for-old-post/res/views/notice_error.php on line 3
- > PHP Fatal error
require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/simple-alert-for-old-post/tests/bootstrap.php on line 8
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: posts, text, post
simple-alert-for-old-post/simple-alert-for-old-post.php Passed 13 tests
Analyzing the main PHP file in "Simple Alert for Old Post" version 1.0.1
43 characters long description:
This is the show alert plugin for old post.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin1,113 lines of code in 29 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 8 | 116 | 46 | 414 |
SVG | 2 | 2 | 2 | 149 |
JavaScript | 4 | 26 | 37 | 114 |
Sass | 6 | 18 | 0 | 95 |
Bourne Shell | 1 | 20 | 6 | 94 |
CSS | 4 | 16 | 2 | 91 |
PO File | 1 | 34 | 27 | 91 |
Markdown | 1 | 14 | 0 | 32 |
JSON | 1 | 0 | 0 | 19 |
XML | 1 | 0 | 0 | 14 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.21 |
Average class complexity | 6.75 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 13.00 |
Average method complexity | 1.74 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 8.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 4 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 31 | |
▷ Static methods | 2 | 6.45% |
▷ Public methods | 16 | 51.61% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 15 | 48.39% |
Functions | 1 | |
▷ Named functions | 1 | 100.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 50% from 2 tests
Image compression 50% from 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.95MB with 0.69MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
src/screenshots/screenshot-2.png | 254.79KB | 69.56KB | ▼ 72.70% |
src/screenshots/screenshot-1.png | 612.79KB | 177.75KB | ▼ 70.99% |
src/screenshots/screenshot-3.png | 107.62KB | 29.53KB | ▼ 72.56% |