Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully
Server metrics [RAM: ▲0.37MB] [CPU: ▼144.08ms] Passed 4 tests
This is a short check of server-side resources used by Civil Publisher Tools
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.12 ▲0.40 | 36.94 ▲16.48 |
Dashboard /wp-admin | 3.45 ▲0.40 | 44.82 ▼7.02 |
Posts /wp-admin/edit.php | 3.50 ▲0.39 | 45.56 ▼1.79 |
Add New Post /wp-admin/post-new.php | 5.79 ▲0.36 | 87.41 ▼566.54 |
Media Library /wp-admin/upload.php | 3.33 ▲0.33 | 33.31 ▼0.96 |
Credibility Indicators /wp-admin/admin.php?page=civil-publisher-credibiity-indicators | 3.30 | 32.27 |
Story Boosts /wp-admin/admin.php?page=civil-publisher-story-boosts-settings | 3.30 | 29.71 |
Server storage [IO: ▲0.73MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 94 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
Checking browser requirements for Civil Publisher Tools
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,776 ▲170 | 16.24 ▲0.25 | 9.43 ▲0.80 | 46.18 ▼3.52 |
Dashboard /wp-admin | 3,046 ▲112 | 5.86 ▼0.23 | 143.31 ▼3.25 | 108.12 ▼7.77 |
Posts /wp-admin/edit.php | 2,816 ▲77 | 2.71 ▲0.01 | 67.72 ▼0.54 | 90.95 ▲0.61 |
Add New Post /wp-admin/post-new.php | 1,828 ▲328 | 16.67 ▼1.97 | 339.39 ▼34.75 | 118.24 ▲6.22 |
Media Library /wp-admin/upload.php | 1,884 ▲74 | 5.01 ▼0.00 | 151.78 ▲3.45 | 115.43 ▼5.22 |
Credibility Indicators /wp-admin/admin.php?page=civil-publisher-credibiity-indicators | 1,187 | 2.21 | 55.42 | 83.44 |
Story Boosts /wp-admin/admin.php?page=civil-publisher-story-boosts-settings | 1,181 | 2.08 | 55.98 | 95.79 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables
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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
- 2× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/civil-publisher/tests/bootstrap.php
- > /wp-content/plugins/civil-publisher/content-viewer.php
- 14× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function Civil_Publisher\\is_manager_enabled() in wp-content/plugins/civil-publisher/custom-meta.php:56
- > PHP Fatal error
Uncaught Error: Call to undefined function Civil_Publisher\\add_action() in wp-content/plugins/civil-publisher/story-boosts.php:23
- > PHP Fatal error
Trait 'Civil_Publisher\\Singleton' not found in wp-content/plugins/civil-publisher/classes/class-rest-api.php on line 13
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/civil-publisher/story-boosts-settings.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function Civil_Publisher\\esc_html_e() in wp-content/plugins/civil-publisher/newsroom-manager.php:13
- > PHP Fatal error
Uncaught Error: Class 'CivilTestCase' not found in wp-content/plugins/civil-publisher/tests/test-rest-api.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function Civil_Publisher\\get_option() in wp-content/plugins/civil-publisher/utils.php:17
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/civil-publisher/tests/class-base.php:9
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/civil-publisher/credibililty-indicators.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function Civil_Publisher\\is_manager_enabled() in wp-content/plugins/civil-publisher/admin.php:28
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
- Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
civil-publisher/civil-publisher.php 92% from 13 tests
The main file in "Civil Publisher Tools" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
- Description: Keep the plugin description shorter than 140 characters (currently 318 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected6,616 lines of code in 69 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
TypeScript | 42 | 393 | 37 | 4,153 |
PHP | 19 | 393 | 704 | 2,142 |
JSON | 3 | 1 | 0 | 100 |
XML | 2 | 26 | 41 | 95 |
JavaScript | 1 | 4 | 4 | 67 |
Markdown | 1 | 34 | 0 | 53 |
SVG | 1 | 1 | 0 | 6 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.30 |
Average class complexity | 16.88 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 41.00 |
Average method complexity | 3.95 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 21.00 |
Code structure | ||
---|---|---|
Namespaces | 2 | |
Interfaces | 0 | |
Traits | 1 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 1 | 14.29% |
Methods | 43 | |
▷ Static methods | 8 | 18.60% |
▷ Public methods | 38 | 88.37% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 11.63% |
Functions | 62 | |
▷ Named functions | 60 | 96.77% |
▷ Anonymous functions | 2 | 3.23% |
Constants | 36 | |
▷ Global constants | 33 | 91.67% |
▷ Class constants | 3 | 8.33% |
▷ Public constants | 3 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
22 PNG files occupy 0.25MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/ico-error-red@2x.png | 0.79KB | 0.80KB | 0.00% |
images/img-grant-submitted@2x.png | 4.20KB | 2.61KB | ▼ 37.91% |
images/img-firefox-logo@2x.png | 3.49KB | 2.16KB | ▼ 38.24% |
images/img-metamask-modalconfirm@2x.png | 28.94KB | 15.19KB | ▼ 47.50% |
images/img-metamask-small-front@2x.png | 1.75KB | 1.75KB | 0.06% |