Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully
Server metrics [RAM: ▲5.36MB] [CPU: ▲29.32ms] 75% from 4 tests
An overview of server-side resources used by Blocked in China | Check if your site is available in the Chinese mainland
Please fix the following
- Extra RAM: Extra memory usage should kept under 5MB (currently 5.36MB on /wp-admin/admin.php?page=freemius)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 9.19 ▲5.73 | 78.39 ▲34.75 |
Dashboard /wp-admin | 9.21 ▲5.91 | 88.52 ▲36.19 |
Posts /wp-admin/edit.php | 9.21 ▲5.85 | 79.30 ▲28.57 |
Add New Post /wp-admin/post-new.php | 9.85 ▲3.97 | 131.52 ▲21.34 |
Media Library /wp-admin/upload.php | 9.21 ▲5.98 | 68.89 ▲32.62 |
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius | 9.21 | 66.17 |
Server storage [IO: ▲4.57MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 203 new files
Database: no new tables, 9 new options
New WordPress options |
---|
fs_debug_mode |
can_compress_scripts |
widget_recent-posts |
fs_accounts |
fs_active_plugins |
widget_recent-comments |
theysaidso_admin_options |
db_upgraded |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Blocked in China | Check if your site is available in the Chinese mainland
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,859 ▲113 | 14.74 ▲0.07 | 2.13 ▲0.27 | 31.54 ▼13.83 |
Dashboard /wp-admin | 2,237 ▲46 | 5.83 ▲0.95 | 109.72 ▼10.32 | 47.24 ▲2.18 |
Posts /wp-admin/edit.php | 2,123 ▲34 | 2.04 ▲0.05 | 36.65 ▼1.41 | 35.25 ▼2.29 |
Add New Post /wp-admin/post-new.php | 1,532 ▼10 | 17.48 ▼0.71 | 620.69 ▼50.96 | 63.37 ▼1.59 |
Media Library /wp-admin/upload.php | 1,422 ▲34 | 4.23 ▲0.05 | 102.48 ▼8.51 | 45.28 ▼5.24 |
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius | 1,066 | 1.69 | 27.62 | 27.81 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
- The plugin did not uninstall gracefully
- > Notice in wp-content/plugins/blocked-in-china/freemius/includes/class-freemius.php+8486
Undefined property: stdClass::$plugins
- Zombie WordPress options were found after uninstall: 9 options
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-posts
- fs_accounts
- widget_recent-comments
- fs_debug_mode
- can_compress_scripts
- db_upgraded
- fs_active_plugins
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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
- 5× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/blocked-in-china/admin/templates/log.php:3
- > PHP Fatal error
Uncaught Error: Call to a member function is_plan() on null in wp-content/plugins/blocked-in-china/admin/templates/schedule.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/blocked-in-china/admin/templates/bundle.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/blocked-in-china/admin/class-admin-controller.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/blocked-in-china/admin/templates/form.php:3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
10 plugin tags: detect, firewall, status, blocked, vpn...
blocked-in-china/blocked-in-china.php Passed 13 tests
The main PHP file in "Blocked in China | Check if your site is available in the Chinese mainland" ver. 1.0.6 adds more information about the plugin and also serves as the entry point for this plugin
72 characters long description:
Run status checks to see if your website is available in mainland China.
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin34,882 lines of code in 144 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 123 | 8,144 | 17,236 | 33,856 |
SVG | 2 | 0 | 2 | 627 |
JavaScript | 5 | 62 | 98 | 351 |
CSS | 14 | 6 | 0 | 48 |
PHP code 50% from 2 tests
A short review of cyclomatic complexity and code structure
It is recommended to fix the following
- Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.63 |
Average class complexity | 91.98 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3,073.00 |
Average method complexity | 4.59 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 94.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 49 | |
▷ Abstract classes | 2 | 4.08% |
▷ Concrete classes | 47 | 95.92% |
▷ Final classes | 0 | 0.00% |
Methods | 1,271 | |
▷ Static methods | 197 | 15.50% |
▷ Public methods | 882 | 69.39% |
▷ Protected methods | 17 | 1.34% |
▷ Private methods | 372 | 29.27% |
Functions | 109 | |
▷ Named functions | 109 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 148 | |
▷ Global constants | 101 | 68.24% |
▷ Class constants | 47 | 31.76% |
▷ Public constants | 47 | 100.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
15 PNG files occupy 0.15MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
freemius/includes/freemius-pricing/dd89563360f0272635c8f0ab7d7f1402.png | 11.80KB | 3.94KB | ▼ 66.64% |
freemius/includes/freemius-pricing/c03f665db27af43971565560adfba594.png | 6.06KB | 3.01KB | ▼ 50.27% |
freemius/includes/freemius-pricing/5480ed23b199531a8cbc05924f26952b.png | 7.09KB | 2.94KB | ▼ 58.58% |
assets/images/icon-sic.png | 5.95KB | 4.57KB | ▼ 23.25% |
freemius/includes/freemius-pricing/178afa6030e76635dbe835e111d2c507.png | 5.88KB | 3.01KB | ▼ 48.84% |