Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.03MB] [CPU: ▼11.15ms] Passed 4 tests
Analyzing server-side resources used by Shamor
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.22 ▼0.25 | 19.31 ▼17.76 |
Dashboard /wp-admin | 3.44 ▲0.09 | 44.62 ▼14.89 |
Posts /wp-admin/edit.php | 3.55 ▲0.19 | 49.84 ▲1.87 |
Add New Post /wp-admin/post-new.php | 6.02 ▲0.13 | 83.97 ▼13.71 |
Media Library /wp-admin/upload.php | 3.36 ▲0.13 | 34.63 ▲1.75 |
Server storage [IO: ▲68.07MB] [DB: ▲0.00MB] 67% from 3 tests
A short overview of filesystem and database impact
Please try to fix the following items
- Total filesystem usage must be limited to 25MB (currently using 68.07MB)
Filesystem: 103 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
can_compress_scripts |
widget_recent-comments |
widget_recent-posts |
widget_theysaidso_widget |
db_upgraded |
Browser metrics Passed 4 tests
Checking browser requirements for Shamor
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,472 ▼274 | 13.21 ▼1.17 | 0.49 ▼1.10 | 17.32 ▼22.75 |
Dashboard /wp-admin | 2,219 ▲31 | 5.84 ▲0.98 | 106.83 ▼6.85 | 39.28 ▼2.31 |
Posts /wp-admin/edit.php | 2,084 ▼5 | 2.00 ▼0.05 | 38.69 ▼1.92 | 33.90 ▼2.29 |
Add New Post /wp-admin/post-new.php | 1,546 ▲25 | 23.09 ▼0.13 | 678.57 ▲9.54 | 61.87 ▲3.39 |
Media Library /wp-admin/upload.php | 1,404 ▲13 | 4.21 ▼0.00 | 104.47 ▲6.97 | 46.14 ▼0.15 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
- This plugin did not uninstall successfully, leaving 6 options in the database
- theysaidso_admin_options
- widget_recent-comments
- db_upgraded
- widget_theysaidso_widget
- widget_recent-posts
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
- 1× PHP files output text when accessed directly:
- > /wp-content/plugins/shamor/wp-shamor.php
- 39× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Record\\AbstractRecord' not found in wp-content/plugins/shamor/vendor/geoip2/geoip2/src/Record/Traits.php:118
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Model\\AbstractModel' not found in wp-content/plugins/shamor/vendor/geoip2/geoip2/src/Model/Country.php:33
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Exception\\GeoIp2Exception' not found in wp-content/plugins/shamor/vendor/geoip2/geoip2/src/Exception/AuthenticationException.php:10
- > PHP Fatal error
Uncaught Error: Interface 'GeoIp2\\ProviderInterface' not found in wp-content/plugins/shamor/vendor/geoip2/geoip2/src/Database/Reader.php:37
- > PHP Fatal error
Uncaught Error: Class 'MaxMind\\Exception\\HttpException' not found in wp-content/plugins/shamor/vendor/maxmind/web-service-common/src/Exception/InvalidRequestException.php:10
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Model\\Country' not found in wp-content/plugins/shamor/vendor/geoip2/geoip2/src/Model/City.php:32
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Record\\AbstractPlaceRecord' not found in wp-content/plugins/shamor/vendor/geoip2/geoip2/src/Record/Continent.php:24
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Model\\AbstractModel' not found in wp-content/plugins/shamor/vendor/geoip2/geoip2/src/Model/Domain.php:21
- > PHP Fatal error
require(): Failed opening required 'wp-content/plugins/shamor/vendor/geoip2/geoip2/examples/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/shamor/vendor/geoip2/geoip2/examples/benchmark.php on line 3
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Model\\AbstractModel' not found in wp-content/plugins/shamor/vendor/geoip2/geoip2/src/Model/Asn.php:23
- > PHP Fatal error
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 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:
- Screenshots: Screenshot #1 (Dashboard) image required
shamor/wp-shamor.php 92% from 13 tests
Analyzing the main PHP file in "Shamor" version 1.8
It is important to fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("shamor.php" instead of "wp-shamor.php")
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
Everything looks great! No dangerous files found in this plugin5,618 lines of code in 90 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 67 | 757 | 2,003 | 3,271 |
Markdown | 8 | 418 | 0 | 1,029 |
C | 1 | 118 | 25 | 668 |
JSON | 6 | 0 | 0 | 435 |
YAML | 3 | 13 | 0 | 62 |
XML | 1 | 4 | 0 | 59 |
Bourne Shell | 1 | 18 | 0 | 38 |
m4 | 1 | 8 | 0 | 32 |
JavaScript | 1 | 0 | 0 | 16 |
C/C++ Header | 1 | 4 | 12 | 8 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.38 |
Average class complexity | 8.11 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 60.00 |
Average method complexity | 2.97 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 14 | |
Interfaces | 2 | |
Traits | 0 | |
Classes | 52 | |
▷ Abstract classes | 3 | 5.77% |
▷ Concrete classes | 49 | 94.23% |
▷ Final classes | 0 | 0.00% |
Methods | 190 | |
▷ Static methods | 32 | 16.84% |
▷ Public methods | 137 | 72.11% |
▷ Protected methods | 1 | 0.53% |
▷ Private methods | 52 | 27.37% |
Functions | 6 | |
▷ Named functions | 2 | 33.33% |
▷ Anonymous functions | 4 | 66.67% |
Constants | 22 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 22 | 100.00% |
▷ Public constants | 4 | 18.18% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 75.13KB | 21.46KB | ▼ 71.43% |