Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
- This plugin did not install gracefully
- > Deprecated in wp-content/plugins/copernicus/lib/composer/vendor/james-heinrich/phpthumb/phpthumb.functions.php+1012
Array and string offset access syntax with curly braces is deprecated
Server metrics [RAM: ▼1.16MB] [CPU: ▼43.74ms] Passed 4 tests
Analyzing server-side resources used by Copernicus
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.82 ▼0.64 | 13.15 ▼31.34 |
Dashboard /wp-admin | 2.85 ▼0.45 | 16.32 ▼29.02 |
Posts /wp-admin/edit.php | 2.85 ▼0.50 | 19.78 ▼23.76 |
Add New Post /wp-admin/post-new.php | 2.85 ▼3.03 | 16.54 ▼90.83 |
Media Library /wp-admin/upload.php | 2.85 ▼0.38 | 15.47 ▼18.98 |
Add New /wp-admin/post-new.php?post_type=wp_log | 2.85 | 16.09 |
Logs /wp-admin/edit.php?post_type=wp_log | 2.85 | 18.02 |
Tags /wp-admin/edit-tags.php?taxonomy=wp_log_type&post_type=wp_log | 2.85 | 16.50 |
Translations /wp-admin/options-general.php?page=cp_translation | 2.85 | 17.73 |
Server storage [IO: ▲3.26MB] [DB: ▲0.07MB] 67% from 3 tests
Analyzing filesystem and database footprints of this plugin
Just a few items left to fix
- There were 3 files (0.00KB) illegally modified outside of "wp-content/plugins/copernicus/" and "wp-content/uploads/"
- (new file) wp-content/cache/js/.empty
- (new file) wp-content/cache/smarty/.empty
- (new file) wp-content/cache/css/.empty
Filesystem: 703 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
db_upgraded |
widget_recent-comments |
widget_recent-posts |
can_compress_scripts |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Copernicus
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,846 ▲111 | 13.44 ▼0.79 | 1.85 ▲0.33 | 38.32 ▲0.75 |
Dashboard /wp-admin | 2,249 ▲57 | 4.91 ▼0.03 | 110.01 ▼2.55 | 40.45 ▲1.60 |
Posts /wp-admin/edit.php | 2,136 ▲47 | 2.24 ▲0.21 | 40.92 ▲1.94 | 35.65 ▼0.17 |
Add New Post /wp-admin/post-new.php | 1,550 ▲26 | 22.24 ▼1.26 | 671.92 ▲66.03 | 47.16 ▼5.90 |
Media Library /wp-admin/upload.php | 1,431 ▲40 | 4.18 ▼0.01 | 97.91 ▼6.11 | 42.42 ▼0.50 |
Add New /wp-admin/post-new.php?post_type=wp_log | 2,256 | 7.72 | 180.56 | 62.04 |
Logs /wp-admin/edit.php?post_type=wp_log | 1,097 | 2.21 | 31.38 | 27.95 |
Tags /wp-admin/edit-tags.php?taxonomy=wp_log_type&post_type=wp_log | 1,438 | 2.31 | 30.34 | 29.91 |
Translations /wp-admin/options-general.php?page=cp_translation | 828 | 1.81 | 24.49 | 24.28 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.08MB] 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
- This plugin cannot be uninstalled
- > Warning in wp-content/plugins/copernicus/lib/core/class-language.php+152
count(): Parameter must be an array or an object that implements Countable
- The uninstall procedure has failed, leaving 6 options in the database
- theysaidso_admin_options
- db_upgraded
- can_compress_scripts
- widget_recent-posts
- widget_theysaidso_widget
- widget_recent-comments
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
- 22 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=cp_translation
- > Warning in wp-content/plugins/copernicus/lib/core/class-language.php+152
count(): Parameter must be an array or an object that implements Countable
- 60 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=cp_translation
- > Notice in wp-content/plugins/copernicus/lib/core/class-admin.php+132
Trying to access array offset on value of type null
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
- 14× PHP files output text when accessed directly (only 10 are shown):
- > /wp-content/plugins/copernicus/lib/composer/vendor/james-heinrich/phpthumb/demo/phpThumb.demo.demo.php
- > /wp-content/plugins/copernicus/lib/composer/vendor/james-heinrich/phpthumb/demo/phpThumb.demo.random.php
- > /wp-content/plugins/copernicus/lib/composer/vendor/kriswallsmith/assetic/tests/bootstrap.php
- > /wp-content/plugins/copernicus/lib/composer/vendor/james-heinrich/phpthumb/demo/phpThumb.demo.object.php
- > /wp-content/plugins/copernicus/lib/composer/vendor/james-heinrich/phpthumb/phpThumb.php
- > /wp-content/plugins/copernicus/lib/composer/vendor/james-heinrich/phpthumb/cache/source/index.php
- > /wp-content/plugins/copernicus/lib/composer/vendor/james-heinrich/phpthumb/demo/phpThumb.demo.object.simple.php
- > /wp-content/plugins/copernicus/lib/composer/vendor/james-heinrich/phpthumb/demo/index.php
- > /wp-content/plugins/copernicus/lib/composer/vendor/james-heinrich/phpthumb/index.php
- > /wp-content/plugins/copernicus/lib/composer/vendor/james-heinrich/phpthumb/demo/phpThumb.demo.showpic.php
- 281× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Assetic\\Test\\Filter\\FilterTestCase' not found in wp-content/plugins/copernicus/lib/composer/vendor/kriswallsmith/assetic/tests/Assetic/Test/Filter/CleanCssFilterTest.php:20
- > PHP Fatal error
Uncaught Error: Class 'Smarty_Internal_ParseTree' not found in wp-content/plugins/copernicus/lib/composer/vendor/smarty/smarty/libs/sysplugins/smarty_internal_parsetree_dq.php:18
- > PHP Fatal error
Uncaught Error: Interface 'Assetic\\Factory\\Resource\\ResourceInterface' not found in wp-content/plugins/copernicus/lib/composer/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/FileResource.php:19
- > PHP Fatal error
Uncaught Error: Interface 'Assetic\\Filter\\FilterInterface' not found in wp-content/plugins/copernicus/lib/composer/vendor/kriswallsmith/assetic/src/Assetic/Filter/GoogleClosure/BaseCompilerFilter.php:22
- > PHP Fatal error
Uncaught Error: Class 'Twig_Node' not found in wp-content/plugins/copernicus/lib/composer/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticNode.php:16
- > PHP Fatal error
Uncaught Error: Class 'Smarty_Internal_CompileBase' not found in wp-content/plugins/copernicus/lib/composer/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_while.php:17
- > PHP Fatal error
Uncaught Error: Class 'Smarty_Internal_CompileBase' not found in wp-content/plugins/copernicus/lib/composer/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_foreachsection.php:17
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/copernicus/lib/composer/vendor/kriswallsmith/assetic/tests/Assetic/Test/Util/SassUtilsTest.php:16
- > PHP Fatal error
Uncaught Error: Call to undefined function pcntl_signal() in wp-content/plugins/copernicus/lib/composer/vendor/symfony/process/Tests/SignalListener.php:12
- > PHP Fatal error
Uncaught Error: Class 'Assetic\\Filter\\BaseCssFilter' not found in wp-content/plugins/copernicus/lib/composer/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssRewriteFilter.php:21
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
- Plugin Name: You should set the name of your plugin on the first line (
=== copernicus ===
)
copernicus/copernicus.php 92% from 13 tests
The main PHP script in "Copernicus" version 1.3.0 is automatically included on every request by WordPress
It is important to fix the following:
- Git Repository: There should be no Git repositories present in your plugin
Code Analysis 95% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected54,007 lines of code in 651 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 538 | 9,747 | 22,705 | 49,904 |
JavaScript | 16 | 893 | 1,285 | 1,536 |
Markdown | 19 | 339 | 0 | 968 |
JSON | 8 | 0 | 0 | 544 |
CSS | 17 | 95 | 95 | 329 |
Sass | 15 | 61 | 2 | 242 |
Smarty | 2 | 45 | 2 | 200 |
HTML | 13 | 0 | 0 | 128 |
Twig | 16 | 0 | 0 | 56 |
YAML | 2 | 14 | 8 | 53 |
XML | 2 | 7 | 5 | 43 |
LESS | 2 | 1 | 0 | 3 |
Handlebars | 1 | 0 | 0 | 1 |
PHP code 0% from 2 tests
This is a very shot review of cyclomatic complexity and code structure
The following items need your attention
- Please reduce cyclomatic complexity of classes to less than 1000 (currently 1,052)
- Method cyclomatic complexity has to be reduced to less than 100 (currently 236)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.41 |
Average class complexity | 14.60 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 1,052.00 |
Average method complexity | 3.50 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 236.00 |
Code structure | ||
---|---|---|
Namespaces | 33 | |
Interfaces | 14 | |
Traits | 0 | |
Classes | 505 | |
▷ Abstract classes | 37 | 7.33% |
▷ Concrete classes | 468 | 92.67% |
▷ Final classes | 0 | 0.00% |
Methods | 2,905 | |
▷ Static methods | 145 | 4.99% |
▷ Public methods | 2,599 | 89.47% |
▷ Protected methods | 189 | 6.51% |
▷ Private methods | 117 | 4.03% |
Functions | 177 | |
▷ Named functions | 131 | 74.01% |
▷ Anonymous functions | 46 | 25.99% |
Constants | 243 | |
▷ Global constants | 19 | 7.82% |
▷ Class constants | 224 | 92.18% |
▷ Public constants | 224 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
15 PNG files occupy 0.10MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
lib/composer/vendor/kriswallsmith/assetic/tests/Assetic/Test/Filter/fixtures/home.png | 0.18KB | 0.12KB | ▼ 35.87% |
lib/composer/vendor/james-heinrich/phpthumb/images/alpha.png | 2.25KB | 2.46KB | 0.00% |
lib/composer/vendor/james-heinrich/phpthumb/images/frame1.png | 13.95KB | 8.32KB | ▼ 40.38% |
static/datepicker/css/calendar.png | 0.21KB | 0.15KB | ▼ 29.36% |
static/datepicker/css/metallic/selected-date.png | 0.93KB | 0.13KB | ▼ 85.76% |