Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully
Server metrics [RAM: ▲5.36MB] [CPU: ▲24.00ms] 75% from 4 tests
Analyzing server-side resources used by Divi Content Restrictor
Please take the time to fix the following items
- Extra RAM: Extra memory usage must be kept under 5MB (currently 5.36MB on /wp-admin/admin.php?page=freemius)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 9.20 ▲5.73 | 74.19 ▲31.32 |
Dashboard /wp-admin | 9.22 ▲5.91 | 75.05 ▲29.86 |
Posts /wp-admin/edit.php | 9.22 ▲5.86 | 81.01 ▲34.39 |
Add New Post /wp-admin/post-new.php | 9.84 ▲3.95 | 103.54 ▲1.37 |
Media Library /wp-admin/upload.php | 9.22 ▲5.99 | 67.51 ▲33.44 |
Divi Content Restrictor /wp-admin/admin.php?page=content-restrictor-for-divi | 9.22 | 79.63 |
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius | 9.22 | 59.12 |
Server storage [IO: ▲3.22MB] [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: 236 new files
Database: no new tables, 9 new options
New WordPress options |
---|
widget_recent-comments |
theysaidso_admin_options |
fs_debug_mode |
can_compress_scripts |
fs_active_plugins |
widget_theysaidso_widget |
db_upgraded |
fs_accounts |
widget_recent-posts |
Browser metrics Passed 4 tests
Checking browser requirements for Divi Content Restrictor
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,818 ▲72 | 13.57 ▼1.06 | 2.01 ▲0.01 | 31.92 ▼12.59 |
Dashboard /wp-admin | 2,224 ▲39 | 5.80 ▲0.91 | 103.46 ▼5.14 | 40.34 ▼7.53 |
Posts /wp-admin/edit.php | 2,107 ▲15 | 2.02 ▲0.06 | 39.85 ▼4.28 | 38.96 ▼0.38 |
Add New Post /wp-admin/post-new.php | 1,523 ▼6 | 21.94 ▲3.52 | 675.42 ▲55.05 | 61.39 ▲10.70 |
Media Library /wp-admin/upload.php | 1,406 ▲15 | 4.19 ▲0.01 | 95.34 ▼8.42 | 47.56 ▲4.55 |
Divi Content Restrictor /wp-admin/admin.php?page=content-restrictor-for-divi | 975 | 1.71 | 25.77 | 59.66 |
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius | 1,078 | 1.83 | 22.76 | 25.68 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- Uninstall procedure had uncaught errors
- > Notice in wp-content/plugins/content-restrictor-for-divi/freemius/includes/class-freemius.php+8486
Undefined property: stdClass::$plugins
- This plugin does not fully uninstall, leaving 9 options in the database
- widget_theysaidso_widget
- fs_debug_mode
- widget_recent-comments
- fs_active_plugins
- can_compress_scripts
- theysaidso_admin_options
- db_upgraded
- fs_accounts
- widget_recent-posts
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested
SRP 50% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
- 16× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Container\\ContainerInterface' not found in wp-content/plugins/content-restrictor-for-divi/vendor/pimple/pimple/src/Pimple/Psr11/ServiceLocator.php:38
- > PHP Fatal error
Uncaught Error: Class 'DiviExtension' not found in wp-content/plugins/content-restrictor-for-divi/includes/DiviContentRestrictorExtension.php:3
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/content-restrictor-for-divi/vendor/pimple/pimple/src/Pimple/Tests/PimpleServiceProviderInterfaceTest.php:34
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Container\otFoundExceptionInterface' not found in wp-content/plugins/content-restrictor-for-divi/vendor/pimple/pimple/src/Pimple/Exception/UnknownIdentifierException.php:36
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/content-restrictor-for-divi/vendor/pimple/pimple/src/Pimple/Tests/ServiceIteratorTest.php:34
- > PHP Fatal error
Uncaught Error: Class 'Pimple\\Container' not found in wp-content/plugins/content-restrictor-for-divi/includes/classes/Loader.php:9
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/content-restrictor-for-divi/vendor/pimple/pimple/src/Pimple/Tests/Psr11/ServiceLocatorTest.php:39
- > PHP Fatal error
Uncaught Error: Interface 'Pimple\\ServiceProviderInterface' not found in wp-content/plugins/content-restrictor-for-divi/vendor/pimple/pimple/src/Pimple/Tests/Fixtures/PimpleServiceProvider.php:32
- > PHP Fatal error
Uncaught Error: Class 'ET_Builder_Module_Field_Base' not found in wp-content/plugins/content-restrictor-for-divi/includes/classes/Divi/BoxShadow.php:4
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/content-restrictor-for-divi/vendor/pimple/pimple/src/Pimple/Tests/Psr11/ContainerTest.php:34
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: divi restrict content, divi content access control
content-restrictor-for-divi/content-restrictor-for-divi.php 85% from 13 tests
The main file in "Divi Content Restrictor" v. 1.4.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
- Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
- Domain Path: The domain path points to a folder that does not exist ("/languages")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected36,020 lines of code in 185 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 156 | 8,453 | 18,510 | 35,483 |
JavaScript | 6 | 36 | 60 | 201 |
JSON | 3 | 0 | 0 | 165 |
reStructuredText | 1 | 94 | 135 | 97 |
YAML | 2 | 5 | 0 | 38 |
CSS | 15 | 0 | 0 | 15 |
XML | 1 | 1 | 0 | 13 |
Markdown | 1 | 5 | 0 | 8 |
PHP code 50% from 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
- Class cyclomatic complexity should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.61 |
Average class complexity | 58.79 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3,073.00 |
Average method complexity | 4.38 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 94.00 |
Code structure | ||
---|---|---|
Namespaces | 13 | |
Interfaces | 4 | |
Traits | 0 | |
Classes | 76 | |
▷ Abstract classes | 2 | 2.63% |
▷ Concrete classes | 74 | 97.37% |
▷ Final classes | 2 | 2.70% |
Methods | 1,433 | |
▷ Static methods | 218 | 15.21% |
▷ Public methods | 1,039 | 72.51% |
▷ Protected methods | 20 | 1.40% |
▷ Private methods | 374 | 26.10% |
Functions | 159 | |
▷ Named functions | 100 | 62.89% |
▷ Anonymous functions | 59 | 37.11% |
Constants | 145 | |
▷ Global constants | 98 | 67.59% |
▷ Class constants | 47 | 32.41% |
▷ Public constants | 47 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
freemius/assets/img/content-restrictor-for-divi.png | 6.66KB | 3.35KB | ▼ 49.68% |
freemius/assets/img/plugin-icon.png | 9.16KB | 5.26KB | ▼ 42.58% |
freemius/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |