Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.11MB] [CPU: ▼143.85ms] Passed 4 tests
Server-side resources used by Ratio. Site Control.
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.92 ▲0.09 | 39.43 ▲6.16 |
Dashboard /wp-admin | 3.17 ▲0.12 | 55.05 ▼1.20 |
Posts /wp-admin/edit.php | 3.29 ▲0.18 | 48.89 ▲0.39 |
Add New Post /wp-admin/post-new.php | 5.54 ▲0.11 | 99.95 ▼550.87 |
Media Library /wp-admin/upload.php | 3.12 ▲0.11 | 35.67 ▼23.72 |
Ratio /wp-admin/admin.php?page=ratio | 3.09 | 31.23 |
Facebook /wp-admin/admin.php?page=ratio-admin-facebook | 3.09 | 30.16 |
Google analytics /wp-admin/admin.php?page=ratio-admin-google | 3.09 | 36.26 |
Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
Checking browser requirements for Ratio. Site Control.
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,752 ▲156 | 16.05 ▲0.48 | 24.34 ▲15.62 | 49.30 ▼5.44 |
Dashboard /wp-admin | 3,006 ▲72 | 5.96 ▼0.00 | 144.19 ▼0.27 | 120.76 ▲1.60 |
Posts /wp-admin/edit.php | 2,778 ▲39 | 2.69 ▼0.00 | 67.30 ▼4.48 | 95.96 ▼3.82 |
Add New Post /wp-admin/post-new.php | 1,623 ▲42 | 19.00 ▲1.24 | 391.01 ▼19.73 | 111.07 ▼10.03 |
Media Library /wp-admin/upload.php | 1,849 ▲42 | 5.03 ▲0.01 | 149.03 ▼47.81 | 122.50 ▼21.08 |
Ratio /wp-admin/admin.php?page=ratio | 1,167 | 2.05 | 60.02 | 87.02 |
Facebook /wp-admin/admin.php?page=ratio-admin-facebook | 1,095 | 2.09 | 58.86 | 82.32 |
Google analytics /wp-admin/admin.php?page=ratio-admin-google | 1,089 | 2.09 | 59.45 | 87.34 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Please fix the following
- 1× PHP files output text when accessed directly:
- > /wp-content/plugins/ratio-site-control/index.php
- 10× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/ratio-site-control/admin/partials/ratio-admin.php:18
- > PHP Fatal error
Uncaught Error: Class 'Ratio_Public' not found in wp-content/plugins/ratio-site-control/public/class-ratio-public-google.php:12
- > PHP Fatal error
Uncaught Error: Class 'Ratio_Admin' not found in wp-content/plugins/ratio-site-control/admin/class-ratio-admin-facebook.php:18
- > PHP Fatal error
Uncaught Error: Class 'Ratio' not found in wp-content/plugins/ratio-site-control/admin/class-ratio-admin.php:17
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/ratio-site-control/admin/partials/ratio-admin-facebook.php:17
- > PHP Fatal error
Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/ratio-site-control/includes/class-ratio.php:60
- > PHP Fatal error
Uncaught Error: Class 'Ratio_Admin' not found in wp-content/plugins/ratio-site-control/admin/class-ratio-admin-google.php:17
- > PHP Fatal error
Uncaught Error: Class 'Ratio_Public' not found in wp-content/plugins/ratio-site-control/public/class-ratio-public-facebook.php:16
- > PHP Fatal error
Uncaught Error: Class 'Ratio' not found in wp-content/plugins/ratio-site-control/public/class-ratio-public.php:19
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/ratio-site-control/admin/partials/ratio-admin-google.php:17
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: google analytics, facebook sdk, facebook
ratio-site-control/ratio.php 85% from 13 tests
Analyzing the main PHP file in "Ratio. Site Control." version 1.0.0
Please make the necessary changes and fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("ratio-site-control.php" instead of "ratio.php")
- Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected578 lines of code in 15 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 14 | 112 | 399 | 542 |
JSON | 1 | 0 | 0 | 36 |
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.28 |
Average class complexity | 6.57 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 27.00 |
Average method complexity | 2.09 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 19.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 37 | |
▷ Static methods | 4 | 10.81% |
▷ Public methods | 34 | 91.89% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 3 | 8.11% |
Functions | 3 | |
▷ Named functions | 1 | 33.33% |
▷ Anonymous functions | 2 | 66.67% |
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
There were not PNG files found in your plugin