Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully
Server metrics [RAM: ▼0.27MB] [CPU: ▼11.46ms] Passed 4 tests
An overview of server-side resources used by ZIP Code Based Content Protection
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.90 ▲0.44 | 59.51 ▲14.51 |
Dashboard /wp-admin | 3.76 ▲0.46 | 56.32 ▼3.52 |
Posts /wp-admin/edit.php | 3.79 ▲0.44 | 55.30 ▲7.48 |
Add New Post /wp-admin/post-new.php | 3.54 ▼2.34 | 42.20 ▼59.71 |
Media Library /wp-admin/upload.php | 3.62 ▲0.39 | 45.09 ▲9.92 |
Settings /wp-admin/admin.php?page=zbcp-settings | 3.59 | 44.73 |
User Requests /wp-admin/admin.php?page=zbcp-users-requests | 3.60 | 42.68 |
ZBCP /wp-admin/admin.php?page=zbcp | 3.60 | 41.88 |
Requested ZIP Codes /wp-admin/admin.php?page=zbcp-requests | 3.60 | 38.31 |
Server storage [IO: ▲7.22MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 30 new files
Database: 3 new tables, 15 new options
New tables |
---|
wp_zipcode_requested |
wp_zipcode_serving |
wp_zipcode_requested_users |
New WordPress options |
---|
cdzc_settings_user_already_requested |
cdzc_settings_for_checkbox |
cdzc_settings_requested_zipcode_highlight |
can_compress_scripts |
cdzc_settings_not_providing_services |
cdzc_settings_no_zipcode_added |
cdzc_settings_frontend_description |
widget_theysaidso_widget |
widget_recent-comments |
theysaidso_admin_options |
... |
Browser metrics Passed 4 tests
An overview of browser requirements for ZIP Code Based Content Protection
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,918 ▲157 | 13.64 ▼0.71 | 8.17 ▲6.38 | 42.35 ▲3.18 |
Dashboard /wp-admin | 2,238 ▲58 | 5.86 ▲0.20 | 89.90 ▼4.71 | 40.96 ▼3.21 |
Posts /wp-admin/edit.php | 2,146 ▲46 | 2.53 ▲0.54 | 41.14 ▲2.14 | 33.09 ▼3.17 |
Add New Post /wp-admin/post-new.php | 1,627 ▲101 | 23.28 ▼0.31 | 676.98 ▼9.66 | 59.09 ▲6.89 |
Media Library /wp-admin/upload.php | 1,443 ▲43 | 4.57 ▲0.35 | 113.24 ▲4.10 | 49.01 ▲3.14 |
Settings /wp-admin/admin.php?page=zbcp-settings | 969 | 2.04 | 37.00 | 31.26 |
User Requests /wp-admin/admin.php?page=zbcp-users-requests | 1,073 | 2.09 | 30.25 | 30.93 |
ZBCP /wp-admin/admin.php?page=zbcp | 1,296 | 2.14 | 33.75 | 27.44 |
Requested ZIP Codes /wp-admin/admin.php?page=zbcp-requests | 1,070 | 2.05 | 32.11 | 27.50 |
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
Please fix the following items
- The uninstall procedure failed, leaving 3 tables in the database
- wp_zipcode_requested
- wp_zipcode_requested_users
- wp_zipcode_serving
- Zombie WordPress options detected upon uninstall: 15 options
- db_upgraded
- cdzc_settings_user_already_requested
- widget_recent-posts
- cdzc_settings_for_checkbox
- zbcp_plugin_general_display_options
- widget_recent-comments
- can_compress_scripts
- cdzc_settings_not_providing_services
- cdzc_settings_thankyou_for_email
- cdzc_settings_requested_zipcode_highlight
- ...
Smoke tests 25% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
- 1× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/zip-code-based-content-protection/admin/partials/zipcode-bcp-admin-display.php
- 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > 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/zip-code-based-content-protection/admin/lists/class-zipcode-bcp-admin-zipcodes-list.php on line 23
- > 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/zip-code-based-content-protection/admin/lists/class-zipcode-bcp-admin-requested-zipcodes.php on line 23
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/zip-code-based-content-protection/admin/lists/class-zipcode-bcp-admin-user-requested-zipcodes.php on line 23
- > 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/zip-code-based-content-protection/admin/lists/class-zipcode-bcp-admin-zipcodes-list.php on line 23
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/zip-code-based-content-protection/admin/lists/class-zipcode-bcp-admin-zipcodes-list.php on line 23
- > PHP Fatal error
Uncaught Error: Call to undefined function get_header() in wp-content/plugins/zip-code-based-content-protection/public/partials/zipcode-bcp-public-display.php:14
- > 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/zip-code-based-content-protection/admin/lists/class-zipcode-bcp-admin-user-requested-zipcodes.php on line 23
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/zip-code-based-content-protection/admin/lists/class-zipcode-bcp-admin-requested-zipcodes.php on line 23
- > 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/zip-code-based-content-protection/admin/lists/class-zipcode-bcp-admin-requested-zipcodes.php on line 23
- > 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/zip-code-based-content-protection/admin/lists/class-zipcode-bcp-admin-user-requested-zipcodes.php on line 23
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
- 3 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=zbcp-requests
- > Rendering (severe) in unknown
/wp-content/plugins/zip-code-based-content-protection/admin/js/zipcode-bcp-admin.js?ver=1.0.0 277 Error: attribute cx: Expected length, "NaN".
- 3 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=zbcp-requests
- > Console-api (warning) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of null (reading 'appendChild')" "TypeError: Cannot read properties of null (reading 'appendChild')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/zip-code-based-content-protection/admin/js/zipcode-bcp-admin.js?ver=1.0.0:304:45)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
- 3 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=zbcp-requests
- > Javascript (severe) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: Cannot read properties of null (reading 'appendChild')
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
- Donate link: Invalid url: "www.presstigers.com"
zip-code-based-content-protection/zipcode-based-content-protection.php 85% from 13 tests
The main PHP file in "ZIP Code Based Content Protection" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("zip-code-based-content-protection.php" instead of "zipcode-based-content-protection.php")
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin344,249 lines of code in 24 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JSON | 1 | 0 | 0 | 341,930 |
PHP | 17 | 386 | 1,077 | 1,640 |
JavaScript | 3 | 17 | 87 | 431 |
CSS | 3 | 13 | 14 | 248 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.18 |
Average class complexity | 8.47 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 22.00 |
Average method complexity | 1.97 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 10.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 15 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 15 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 114 | |
▷ Static methods | 19 | 16.67% |
▷ Public methods | 109 | 95.61% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 4.39% |
Functions | 8 | |
▷ Named functions | 4 | 50.00% |
▷ Anonymous functions | 4 | 50.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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
PNG images were not found in this plugin