Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
- Install procedure validation failed for this plugin
- > Deprecated in wp-content/plugins/code-scanner/includes/code-scanner.php+126
Non-static method Code_Scanner::init() should not be called statically
Server metrics [RAM: ▼1.91MB] [CPU: ▼59.21ms] Passed 4 tests
A check of server-side resources used by Code Scanner
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.08 ▼1.38 | 4.91 ▼36.49 |
Dashboard /wp-admin | 2.10 ▼1.20 | 6.21 ▼42.38 |
Posts /wp-admin/edit.php | 2.10 ▼1.25 | 5.94 ▼53.16 |
Add New Post /wp-admin/post-new.php | 2.10 ▼3.78 | 5.54 ▼104.79 |
Media Library /wp-admin/upload.php | 2.10 ▼1.13 | 5.84 ▼32.51 |
Code Scanner /wp-admin/tools.php?page=code-scanner | 2.10 | 6.24 |
Server storage [IO: ▲1.11MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
db_upgraded |
widget_recent-posts |
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-comments |
Browser metrics Passed 4 tests
An overview of browser requirements for Code Scanner
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,793 ▲32 | 14.39 ▼0.14 | 1.71 ▼0.08 | 43.89 ▼1.57 |
Dashboard /wp-admin | 2,193 ▲13 | 5.51 ▼0.21 | 93.62 ▲2.29 | 38.50 ▼4.76 |
Posts /wp-admin/edit.php | 2,104 ▲4 | 2.01 ▼0.01 | 41.32 ▲1.88 | 35.65 ▼5.12 |
Add New Post /wp-admin/post-new.php | 1,534 ▲8 | 23.10 ▼0.24 | 686.77 ▼16.06 | 51.78 ▲1.05 |
Media Library /wp-admin/upload.php | 1,404 ▲4 | 4.23 ▲0.10 | 103.86 ▼1.69 | 46.95 ▼2.94 |
Code Scanner /wp-admin/tools.php?page=code-scanner | 994 | 2.11 | 25.67 | 44.42 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
- This plugin cannot be uninstalled
- > Deprecated in wp-content/plugins/code-scanner/includes/code-scanner.php+126
Non-static method Code_Scanner::init() should not be called statically
- Zombie WordPress options were found after uninstall: 6 options
- theysaidso_admin_options
- widget_recent-comments
- db_upgraded
- can_compress_scripts
- widget_theysaidso_widget
- widget_recent-posts
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)
Please fix the following server-side errors
- 2 occurences, only the last one shown
- > GET request to /wp-admin/tools.php?page=code-scanner
- > Deprecated in wp-includes/class-wp-hook.php+310
Non-static method Code_Scanner::init() should not be called statically
- > GET request to /wp-admin/tools.php?page=code-scanner
- > Deprecated in wp-content/plugins/code-scanner/includes/code-scanner-functions.php+17
Function create_function() is deprecated
- > GET request to /wp-admin/tools.php?page=code-scanner
- > Warning in wp-content/plugins/code-scanner/views/sidebar.php+43
Use of undefined constant CODE_SCANNER_GITHUB_URL - assumed 'CODE_SCANNER_GITHUB_URL' (this will throw an Error in a future version of PHP)
- 3 occurences, only the last one shown
- > GET request to /wp-admin/tools.php?page=code-scanner
- > Notice in wp-content/plugins/code-scanner/includes/code-scanner-functions.php+133
Undefined variable: file_error_count
- > GET request to /wp-admin/tools.php?page=code-scanner
- > Notice in wp-content/plugins/code-scanner/includes/code-scanner-functions.php+133
Undefined index: twentytwentyone
- 8 occurences, only the last one shown
- > GET request to /wp-admin/tools.php?page=code-scanner
- > Warning in wp-content/plugins/code-scanner/includes/code-scanner-functions.php+133
count(): Parameter must be an array or an object that implements Countable
- > GET request to /wp-admin/tools.php?page=code-scanner
- > Notice in wp-content/plugins/code-scanner/includes/code-scanner-functions.php+133
Undefined index: twentytwenty
- > GET request to /wp-admin/tools.php?page=code-scanner
- > Notice in wp-content/plugins/code-scanner/includes/code-scanner-functions.php+133
Undefined index: twentynineteen
- > GET request to /wp-admin/tools.php?page=code-scanner
- > Notice in wp-content/plugins/code-scanner/includes/code-scanner-functions.php+133
Undefined index: twentytwentythree
- > GET request to /wp-admin/tools.php?page=code-scanner
- > Notice in wp-content/plugins/code-scanner/includes/code-scanner-functions.php+133
Undefined index: twentytwentytwo
- > GET request to /wp-admin/tools.php?page=code-scanner
- > Notice in wp-content/plugins/code-scanner/includes/code-scanner-functions.php+133
Undefined index: wp-admin
- > GET request to /wp-admin/tools.php?page=code-scanner
- > Notice in wp-content/plugins/code-scanner/includes/code-scanner-functions.php+133
Undefined index: .git
- > GET request to /wp-admin/tools.php?page=code-scanner
- > Notice in wp-content/plugins/code-scanner/includes/code-scanner-functions.php+133
Undefined index: wp-includes
SRP 0% 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
Please fix the following
- 2× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/code-scanner/views/admin.php
- > /wp-content/plugins/code-scanner/views/description.php
- 15× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Warning
include_once(CS_MS_VIEWS_PATHsidebar.php): failed to open stream: No such file or directory in wp-content/plugins/code-scanner/views/admin.php on line 13
- > PHP Warning
Use of undefined constant CS_MS_VIEWS_PATH - assumed 'CS_MS_VIEWS_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/code-scanner/views/admin.php on line 13
- > PHP Warning
Use of undefined constant CS_MS_VIEWS_PATH - assumed 'CS_MS_VIEWS_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/code-scanner/views/admin.php on line 10
- > PHP Warning
Use of undefined constant CS_MS_VIEWS_PATH - assumed 'CS_MS_VIEWS_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/code-scanner/views/admin.php on line 17
- > PHP Warning
Use of undefined constant CS_MS_IMAGES_URL - assumed 'CS_MS_IMAGES_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/code-scanner/views/admin.php on line 3
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/code-scanner/views/scan-results.php:7
- > PHP Warning
include_once(CS_MS_VIEWS_PATHscan-results.php): failed to open stream: No such file or directory in wp-content/plugins/code-scanner/views/admin.php on line 17
- > PHP Warning
include_once(): Failed opening 'CS_MS_VIEWS_PATHscan-results.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/code-scanner/views/admin.php on line 17
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/code-scanner/views/scan-result.php:2
- > PHP Warning
include_once(): Failed opening 'CS_MS_VIEWS_PATHsidebar.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/code-scanner/views/admin.php on line 13
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
No plugin tags provided
code-scanner/code-scanner.php Passed 13 tests
The main file in "Code Scanner" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
82 characters long description:
Scans WordPress plugin, theme, and core directories for malicious code injections.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin3,339 lines of code in 14 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
SVG | 1 | 0 | 0 | 2,671 |
PHP | 10 | 108 | 168 | 483 |
CSS | 2 | 30 | 3 | 170 |
JavaScript | 1 | 2 | 0 | 15 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.36 |
Average class complexity | 11.33 |
▷ Minimum class complexity | 6.00 |
▷ Maximum class complexity | 22.00 |
Average method complexity | 2.55 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 17.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 3 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 3 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 20 | |
▷ Static methods | 6 | 30.00% |
▷ Public methods | 20 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 4 | |
▷ Named functions | 4 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 10 | |
▷ Global constants | 8 | 80.00% |
▷ Class constants | 2 | 20.00% |
▷ Public constants | 2 | 100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/cs-icon.png | 8.79KB | 3.63KB | ▼ 58.71% |