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
Installer ran successfully
Server metrics [RAM: ▲0.13MB] [CPU: ▼4.04ms] Passed 4 tests
This is a short check of server-side resources used by Pageview content restriction
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.54 ▲0.08 | 43.67 ▲1.92 |
Dashboard /wp-admin | 3.43 ▲0.13 | 54.07 ▼0.21 |
Posts /wp-admin/edit.php | 3.53 ▲0.17 | 55.05 ▲4.08 |
Add New Post /wp-admin/post-new.php | 6.11 ▲0.22 | 80.73 ▼16.73 |
Media Library /wp-admin/upload.php | 3.37 ▲0.14 | 36.12 ▼1.15 |
Pageview Content Restriction /wp-admin/options-general.php?page=pageview-content-restriction-admin | 3.26 | 34.15 |
Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
db_upgraded |
widget_recent-comments |
widget_recent-posts |
widget_theysaidso_widget |
can_compress_scripts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Pageview content restriction
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲4 | 14.48 ▲1.23 | 1.90 ▼3.31 | 39.35 ▼3.98 |
Dashboard /wp-admin | 2,210 ▲1 | 4.81 ▼1.09 | 98.93 ▲0.63 | 39.55 ▼2.68 |
Posts /wp-admin/edit.php | 2,096 ▲7 | 2.04 ▲0.06 | 41.03 ▲5.25 | 36.17 ▲4.07 |
Add New Post /wp-admin/post-new.php | 1,539 ▲1 | 23.39 ▲0.10 | 697.91 ▲60.81 | 53.44 ▼7.63 |
Media Library /wp-admin/upload.php | 1,395 ▲4 | 4.21 ▲0.01 | 94.68 ▼5.94 | 44.26 ▼4.46 |
Pageview Content Restriction /wp-admin/options-general.php?page=pageview-content-restriction-admin | 804 | 2.03 | 28.46 | 28.43 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
- Uninstall procedure validation failed for this plugin
- > Warning in wp-content/plugins/pageview-content-restriction/uninstall.php+10
rmdir(wp-content/uploads/unauthenticatedsessions): Directory not empty
- Zombie WordPress options detected upon uninstall: 6 options
- widget_recent-comments
- db_upgraded
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-posts
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=pageview-content-restriction-admin
- > Notice in wp-content/plugins/pageview-content-restriction/pageview_content_restriction.php+365
Trying to access array offset on value of type bool
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
- 1× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/pageview-content-restriction/pageview_content_restriction.php:35
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 96% from 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
8 plugin tags: pageviews, content restriction, member only, registration, restricted access...
pageview-content-restriction/pageview_content_restriction.php 92% from 13 tests
The main file in "Pageview content restriction" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("pageview-content-restriction.php" instead of "pageview_content_restriction.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin226 lines of code in 2 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 44 | 123 | 226 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.31 |
Average class complexity | 5.00 |
▷ Minimum class complexity | 5.00 |
▷ Maximum class complexity | 5.00 |
Average method complexity | 1.40 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 5.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 10 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 10 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 10 | |
▷ Named functions | 10 | 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
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin