Benchmarks
Plugin footprint 47% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully
Server metrics [RAM: ▲5.17MB] [CPU: ▲25.48ms] 75% from 4 tests
An overview of server-side resources used by Pets
Please have a look at the following items
- Extra RAM: Extra memory usage should kept under 5MB (currently 5.17MB on /wp-admin/admin.php?page=freemius)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 8.82 ▲5.35 | 74.84 ▲32.66 |
Dashboard /wp-admin | 8.84 ▲5.53 | 76.47 ▲25.92 |
Posts /wp-admin/edit.php | 8.84 ▲5.48 | 83.13 ▲31.35 |
Add New Post /wp-admin/post-new.php | 10.21 ▲4.32 | 118.38 ▲12.95 |
Media Library /wp-admin/upload.php | 8.84 ▲5.61 | 69.84 ▲31.68 |
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius | 8.84 | 57.75 |
Server storage [IO: ▲3.13MB] [DB: ▲0.01MB] Passed 3 tests
Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 220 new files
Database: 2 new tables, 15 new options
New tables |
---|
wp_pets_fields_sections |
wp_pets_fields |
New WordPress options |
---|
widget_pets_search |
widget_recent-comments |
fs_gdpr |
widget_pets_add_missing |
fs_accounts |
fs_active_plugins |
widget_pets_add |
theysaidso_admin_options |
can_compress_scripts |
widget_recent-posts |
... |
Browser metrics Passed 4 tests
An overview of browser requirements for Pets
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,917 ▲146 | 13.33 ▼1.42 | 2.17 ▼0.01 | 34.58 ▼12.82 |
Dashboard /wp-admin | 2,292 ▲104 | 5.86 ▼0.03 | 99.22 ▼3.76 | 42.90 ▼6.83 |
Posts /wp-admin/edit.php | 2,172 ▲83 | 2.02 ▲0.00 | 40.92 ▼1.27 | 38.75 ▲1.75 |
Add New Post /wp-admin/post-new.php | 1,546 ▲18 | 23.20 ▲5.07 | 673.46 ▲15.41 | 51.60 ▼2.82 |
Media Library /wp-admin/upload.php | 1,472 ▲84 | 4.14 ▼0.08 | 107.40 ▼9.26 | 46.44 ▼3.37 |
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius | 1,118 | 1.77 | 24.91 | 31.48 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 25% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
- This plugin did not uninstall without warnings or errors
- > Notice in wp-content/plugins/pets/freemius/includes/class-freemius.php+8575
Undefined property: stdClass::$plugins
- Zombie tables were found after uninstall: 2 tables
- wp_pets_fields
- wp_pets_fields_sections
- Zombie WordPress options were found after uninstall: 15 options
- fs_debug_mode
- widget_pets_search
- widget_theysaidso_widget
- widget_pets_add_missing
- pets_version
- can_compress_scripts
- fs_active_plugins
- widget_recent-comments
- widget_recent-posts
- db_upgraded
- ...
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
- 4× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/pets/templates/before-loop.php
- > /wp-content/plugins/pets/templates/before-loop-while.php
- > /wp-content/plugins/pets/templates/after-loop-while.php
- > /wp-content/plugins/pets/templates/after-loop.php
- 27× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/pets/templates/archive/single.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function get_admin_page_title() in wp-content/plugins/pets/includes/admin/settings/views/main.php:2
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/pets/includes/admin/class-pets-fields-sections-table.php on line 11
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/pets/includes/widgets/class-widgets-add-missing.php:13
- > PHP Fatal error
Uncaught Error: Class 'Pets\\DB\\Fields' not found in wp-content/plugins/pets/templates/missing-form.php:6
- > PHP Warning
require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/pets/includes/admin/class-pets-fields-table.php on line 12
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/pets/includes/widgets/class-widgets-search.php:14
- > PHP Notice
Undefined variable: information in wp-content/plugins/pets/templates/single/information.php on line 6
- > PHP Fatal error
Uncaught Error: Call to undefined function get_header() in wp-content/plugins/pets/templates/archive/loop.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function get_post_type_archive_link() in wp-content/plugins/pets/templates/search-form.php:8
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: animals, pets, animal shelter
pets/pets.php Passed 13 tests
"Pets" version 1.4.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
31 characters long description:
Manage Pets and Animal Shelters
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin35,219 lines of code in 178 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 158 | 8,080 | 17,310 | 34,256 |
JavaScript | 4 | 64 | 77 | 348 |
CSS | 13 | 0 | 0 | 301 |
LESS | 2 | 54 | 0 | 291 |
SVG | 1 | 0 | 0 | 23 |
PHP code 50% from 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
- Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 2,911)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.59 |
Average class complexity | 59.31 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 2,911.00 |
Average method complexity | 4.39 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 86.00 |
Code structure | ||
---|---|---|
Namespaces | 5 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 75 | |
▷ Abstract classes | 3 | 4.00% |
▷ Concrete classes | 72 | 96.00% |
▷ Final classes | 1 | 1.39% |
Methods | 1,323 | |
▷ Static methods | 212 | 16.02% |
▷ Public methods | 976 | 73.77% |
▷ Protected methods | 18 | 1.36% |
▷ Private methods | 329 | 24.87% |
Functions | 111 | |
▷ Named functions | 111 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 128 | |
▷ Global constants | 103 | 80.47% |
▷ Class constants | 25 | 19.53% |
▷ Public constants | 25 | 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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
freemius/assets/img/plugin-icon.png | 9.16KB | 5.26KB | ▼ 42.58% |
freemius/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |