Benchmarks
Plugin footprint 64% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully
Server metrics [RAM: ▲0.82MB] [CPU: ▼1.27ms] Passed 4 tests
Analyzing server-side resources used by Course Booking System Extension
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.02 ▲0.56 | 40.15 ▲1.01 |
Dashboard /wp-admin | 4.23 ▲0.93 | 47.57 ▼4.56 |
Posts /wp-admin/edit.php | 4.28 ▲0.93 | 47.02 ▲0.09 |
Add New Post /wp-admin/post-new.php | 6.80 ▲0.91 | 84.78 ▼1.60 |
Media Library /wp-admin/upload.php | 4.09 ▲0.87 | 40.46 ▲7.30 |
Course Booking System Extension /wp-admin/options-general.php?page=course_booking_system_extension | 4.06 | 33.82 |
Server storage [IO: ▲30.55MB] [DB: ▲0.00MB] 33% from 3 tests
Input-output and database impact of this plugin
Just a few items left to fix
- There were 3 files (2.18KB) illegally modified outside of "wp-content/plugins/course-booking-system-extension/" and "wp-content/uploads/"
- (new file) wp-admin/var/www/wordpress/wp-content/cbse/logs/2023-10-23.log
- (new file) wp-content/themes/twentytwentyone/mp-timetable/shortcodes/cbse_event_head_courses-single.php
- (new file) var/www/wordpress/wp-content/cbse/logs/2023-10-23.log
- Total filesystem usage must be limited to 25MB (currently using 30.55MB)
Filesystem: 1,635 new files
Database: no new tables, 12 new options
New WordPress options |
---|
cbse_licenses_options |
cbse_general_options |
widget_theysaidso_widget |
widget_recent-posts |
can_compress_scripts |
theysaidso_admin_options |
cbse_coach_mail_options |
cbse_covid19_options |
db_upgraded |
cbse_auto_print_options |
... |
Browser metrics Passed 4 tests
Checking browser requirements for Course Booking System Extension
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,793 ▲32 | 14.14 ▼0.15 | 1.60 ▼0.12 | 40.10 ▼3.66 |
Dashboard /wp-admin | 2,193 ▲13 | 5.54 ▼0.13 | 81.10 ▼14.32 | 40.25 ▼2.39 |
Posts /wp-admin/edit.php | 2,107 ▲7 | 1.98 ▼0.05 | 33.92 ▼1.06 | 32.51 ▼6.24 |
Add New Post /wp-admin/post-new.php | 1,531 ▲5 | 23.31 ▲0.01 | 626.62 ▼44.38 | 52.00 ▼22.78 |
Media Library /wp-admin/upload.php | 1,404 ▲4 | 4.25 ▼0.04 | 93.17 ▼2.91 | 38.57 ▼3.99 |
Course Booking System Extension /wp-admin/options-general.php?page=course_booking_system_extension | 852 | 1.99 | 22.83 | 25.78 |
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
You still need to fix the following
- The plugin did not uninstall gracefully
- > Warning in wp-includes/class-wp-hook.php+310
call_user_func_array() expects parameter 1 to be a valid callback, function 'cbse_cron_deactivate' not found or invalid function name
- Zombie WordPress options detected upon uninstall: 12 options
- can_compress_scripts
- db_upgraded
- widget_recent-comments
- cbse_covid19_options
- cbse_pdf_header_options
- widget_recent-posts
- cbse_coach_mail_options
- widget_theysaidso_widget
- cbse_licenses_options
- theysaidso_admin_options
- ...
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected
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
The following issues need your attention
- 93× PHP files output text when accessed directly (only 10 are shown):
- > /wp-content/plugins/course-booking-system-extension/vendor/tecnickcom/tcpdf/examples/barcodes/example_2d_qrcode_png.php
- > /wp-content/plugins/course-booking-system-extension/vendor/tecnickcom/tcpdf/examples/example_035.php
- > /wp-content/plugins/course-booking-system-extension/vendor/tecnickcom/tcpdf/examples/example_033.php
- > /wp-content/plugins/course-booking-system-extension/vendor/tecnickcom/tcpdf/examples/example_016.php
- > /wp-content/plugins/course-booking-system-extension/vendor/tecnickcom/tcpdf/examples/example_014.php
- > /wp-content/plugins/course-booking-system-extension/vendor/tecnickcom/tcpdf/examples/barcodes/example_2d_pdf417_html.php
- > /wp-content/plugins/course-booking-system-extension/vendor/tecnickcom/tcpdf/examples/example_036.php
- > /wp-content/plugins/course-booking-system-extension/vendor/tecnickcom/tcpdf/examples/example_062.php
- > /wp-content/plugins/course-booking-system-extension/vendor/tecnickcom/tcpdf/examples/barcodes/example_2d_qrcode_svg.php
- > /wp-content/plugins/course-booking-system-extension/vendor/tecnickcom/tcpdf/examples/example_048.php
- 197× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'CBSE\\Admin\\Settings\\CbseSettings' not found in wp-content/plugins/course-booking-system-extension/src/Admin/Settings/AutoPrintCbseSettings.php:8
- > PHP Fatal error
Uncaught Error: Class 'Spatie\\Enum\\Enum' not found in wp-content/plugins/course-booking-system-extension/vendor/spatie/icalendar-generator/src/Enums/Classification.php:12
- > PHP Fatal error
Uncaught Error: Class 'Spatie\\IcalendarGenerator\\Properties\\Property' not found in wp-content/plugins/course-booking-system-extension/vendor/spatie/icalendar-generator/src/Properties/DateTimeProperty.php:9
- > PHP Fatal error
Uncaught Error: Class 'Symfony\\Component\\Translation\\Catalogue\\AbstractOperation' not found in wp-content/plugins/course-booking-system-extension/vendor/symfony/translation/Catalogue/MergeOperation.php:25
- > PHP Fatal error
Uncaught ReflectionException: Class Symfony\\Component\\Translation\\Translator does not exist in wp-content/plugins/course-booking-system-extension/vendor/nesbot/carbon/src/Carbon/Translator.php:22
- > PHP Fatal error
Uncaught Error: Interface 'Symfony\\Component\\Translation\\Exception\\ExceptionInterface' not found in wp-content/plugins/course-booking-system-extension/vendor/symfony/translation/Exception/InvalidResourceException.php:19
- > PHP Fatal error
require_once(): Failed opening required 'lib/Analog.php' (include_path='.:/usr/share/php') in wp-content/plugins/course-booking-system-extension/vendor/analog/analog/tests/PsrLogCompatTest.php on line 5
- > PHP Fatal error
Uncaught Error: Class 'Symfony\\Component\\Translation\\Exception\\RuntimeException' not found in wp-content/plugins/course-booking-system-extension/vendor/symfony/translation/Exception/ProviderException.php:19
- > PHP Fatal error
Uncaught Error: Class 'Carbon\\Exceptions\\UnitException' not found in wp-content/plugins/course-booking-system-extension/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitNotConfiguredException.php:16
- > PHP Fatal error
Uncaught Error: Class 'CBSE\\Database\\DatabaseBase' not found in wp-content/plugins/course-booking-system-extension/src/Database/CoursesForAthlete.php:8
- > 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)
No browser issues were found
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
- Screenshots: Please describe screenshot #1 in course-booking-system-extension/assets to your readme.txt
course-booking-system-extension/course-booking-system-extension.php Passed 13 tests
The primary PHP file in "Course Booking System Extension" version 0.4.2 is used by WordPress to initiate all plugin functionality
35 characters long description:
Extension for Course Booking System
Code Analysis 0% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
These items require your attention
- Do not distribute dangerous files with your plugin
- .bat - Batch File in Windows
- ☣ wp-content/plugins/course-booking-system-extension/vendor/bin/carbon.bat
- ☣ wp-content/plugins/course-booking-system-extension/vendor/nesbot/carbon/bin/carbon.bat
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
- ☣ wp-content/plugins/course-booking-system-extension/vendor/tecnickcom/tcpdf/examples/data/cert/tcpdf.crt
- .bat - Batch File in Windows
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1,222 | 12,618 | 44,914 | 94,905 |
XSD | 3 | 92 | 48 | 2,803 |
SVG | 3 | 1 | 1 | 1,882 |
JSON | 13 | 0 | 0 | 1,536 |
Markdown | 20 | 656 | 0 | 1,490 |
YAML | 5 | 36 | 0 | 133 |
XML | 5 | 1 | 0 | 92 |
JavaScript | 1 | 2 | 2 | 35 |
CSS | 3 | 0 | 0 | 10 |
DOS Batch | 2 | 0 | 0 | 8 |
HTML | 1 | 0 | 1 | 0 |
PHP code 0% from 2 tests
This is a very shot review of cyclomatic complexity and code structure
Please tend to the following items
- Please reduce cyclomatic complexity of classes to less than 1000 (currently 4,413)
- Cyclomatic complexity of methods has to be reduced to less than 100 (currently 502)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.37 |
Average class complexity | 29.46 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 4,413.00 |
Average method complexity | 4.66 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 502.00 |
Code structure | ||
---|---|---|
Namespaces | 57 | |
Interfaces | 30 | |
Traits | 28 | |
Classes | 279 | |
▷ Abstract classes | 20 | 7.17% |
▷ Concrete classes | 259 | 92.83% |
▷ Final classes | 22 | 8.49% |
Methods | 3,029 | |
▷ Static methods | 615 | 20.30% |
▷ Public methods | 2,392 | 78.97% |
▷ Protected methods | 433 | 14.30% |
▷ Private methods | 204 | 6.73% |
Functions | 329 | |
▷ Named functions | 62 | 18.84% |
▷ Anonymous functions | 267 | 81.16% |
Constants | 275 | |
▷ Global constants | 143 | 52.00% |
▷ Class constants | 132 | 48.00% |
▷ Public constants | 126 | 95.45% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.56MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
vendor/tecnickcom/tcpdf/examples/images/tcpdf_cell.png | 37.51KB | 36.62KB | ▼ 2.39% |
vendor/tecnickcom/tcpdf/examples/images/img.png | 190.57KB | 64.69KB | ▼ 66.06% |
vendor/tecnickcom/tcpdf/examples/images/alpha.png | 23.33KB | 30.34KB | 0.00% |
vendor/tecnickcom/tcpdf/examples/images/tcpdf_signature.png | 66.34KB | 25.47KB | ▼ 61.61% |
vendor/tecnickcom/tcpdf/examples/images/image_with_alpha.png | 238.49KB | 61.71KB | ▼ 74.12% |