Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.10MB] [CPU: ▼4.51ms] Passed 4 tests
An overview of server-side resources used by Aparat for WordPress
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.55 ▲0.09 | 38.53 ▲0.13 |
Dashboard /wp-admin | 3.40 ▲0.10 | 43.31 ▼7.22 |
Posts /wp-admin/edit.php | 3.52 ▲0.16 | 48.57 ▼2.40 |
Add New Post /wp-admin/post-new.php | 5.98 ▲0.10 | 86.83 ▼8.56 |
Media Library /wp-admin/upload.php | 3.32 ▲0.10 | 38.73 ▲3.80 |
Server storage [IO: ▲0.10MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 7 new options
New WordPress options |
---|
theysaidso_admin_options |
can_compress_scripts |
widget_recent-comments |
widget_recent-posts |
widget_theysaidso_widget |
widget_wpaparat_widget |
db_upgraded |
Browser metrics Passed 4 tests
Aparat for WordPress: an overview of browser usage
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,868 ▲133 | 13.56 ▼0.85 | 1.80 ▲0.14 | 43.16 ▼4.37 |
Dashboard /wp-admin | 2,248 ▲60 | 5.82 ▲0.96 | 103.41 ▲2.74 | 66.76 ▲22.88 |
Posts /wp-admin/edit.php | 2,131 ▲42 | 2.01 ▲0.01 | 35.30 ▼5.49 | 29.37 ▼7.24 |
Add New Post /wp-admin/post-new.php | 6,389 ▲4,853 | 27.58 ▲4.57 | 931.95 ▲302.24 | 42.42 ▼18.72 |
Media Library /wp-admin/upload.php | 1,421 ▲39 | 4.24 ▲0.08 | 108.18 ▲11.43 | 80.27 ▲37.34 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
- This plugin does not fully uninstall, leaving 7 options in the database
- theysaidso_admin_options
- widget_recent-posts
- widget_recent-comments
- db_upgraded
- can_compress_scripts
- widget_theysaidso_widget
- widget_wpaparat_widget
Smoke tests 75% 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 50% 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
The following issues need your attention
- 6× PHP files trigger server errors when accessed directly:
- > PHP Notice
Undefined variable: lastVideoIndex in wp-content/plugins/wp-aparat/templates/widget-item.php on line 5
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_aparat_human_duration() in wp-content/plugins/wp-aparat/templates/widget-item.php:9
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-aparat/aparat-admin.php:7
- > PHP Notice
Undefined variable: figure_size in wp-content/plugins/wp-aparat/templates/widget-item.php on line 6
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-aparat/AparatWidget.php:4
- > PHP Notice
Undefined variable: open_in_new_tab in wp-content/plugins/wp-aparat/templates/widget-item.php on line 7
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: embed, video, aparat
wp-aparat/aparat.php 92% from 13 tests
The primary PHP file in "Aparat for WordPress" version 2.2.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-aparat.php" instead of "aparat.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected866 lines of code in 19 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 6 | 79 | 160 | 435 |
CSS | 4 | 0 | 3 | 172 |
JavaScript | 5 | 9 | 2 | 170 |
PO File | 1 | 52 | 69 | 86 |
SVG | 2 | 0 | 0 | 2 |
JSON | 1 | 0 | 0 | 1 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.25 |
Average class complexity | 13.50 |
▷ Minimum class complexity | 10.00 |
▷ Maximum class complexity | 17.00 |
Average method complexity | 3.08 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 14.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 | 12 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 10 | 83.33% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 2 | 16.67% |
Functions | 25 | |
▷ Named functions | 25 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/aparat-nothumb.png | 13.60KB | 6.27KB | ▼ 53.87% |
assets/images/icon.png | 14.87KB | 0.88KB | ▼ 94.10% |
assets/images/aparat-logo.png | 9.84KB | 3.60KB | ▼ 63.45% |