Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.08MB] [CPU: ▼9.63ms] Passed 4 tests
This is a short check of server-side resources used by mpOperationLogs
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.55 ▲0.09 | 37.16 ▼3.10 |
Dashboard /wp-admin | 3.40 ▲0.05 | 49.54 ▼21.32 |
Posts /wp-admin/edit.php | 3.51 ▲0.15 | 50.83 ▲5.78 |
Add New Post /wp-admin/post-new.php | 5.98 ▲0.09 | 91.97 ▼14.99 |
Media Library /wp-admin/upload.php | 3.32 ▲0.09 | 36.17 ▲0.90 |
IP列表 /wp-admin/admin.php?page=iplist | 3.28 | 30.51 |
管理员操作日志 /wp-admin/admin.php?page=mpoplogs_menuIndex | 3.28 | 31.44 |
日志列表 /wp-admin/admin.php?page=operationLog | 3.28 | 27.56 |
Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 15 new files
Database: 2 new tables, 7 new options
New tables |
---|
wp_mp_logs |
wp_mp_ips |
New WordPress options |
---|
db_upgraded |
theysaidso_admin_options |
can_compress_scripts |
widget_theysaidso_widget |
mp_operation_db_version |
widget_recent-comments |
widget_recent-posts |
Browser metrics Passed 4 tests
An overview of browser requirements for mpOperationLogs
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,831 ▲85 | 13.66 ▼0.59 | 1.68 ▼0.14 | 41.39 ▲1.63 |
Dashboard /wp-admin | 2,237 ▲49 | 4.92 ▲0.02 | 108.50 ▼8.25 | 47.61 ▲0.98 |
Posts /wp-admin/edit.php | 2,120 ▲31 | 1.98 ▼0.03 | 40.13 ▲5.08 | 43.93 ▲8.59 |
Add New Post /wp-admin/post-new.php | 1,567 ▲31 | 18.22 ▼5.19 | 606.14 ▼61.60 | 69.38 ▲7.62 |
Media Library /wp-admin/upload.php | 1,422 ▲34 | 4.23 ▲0.07 | 100.44 ▲3.29 | 50.08 ▲9.47 |
IP列表 /wp-admin/admin.php?page=iplist | 814 | 1.43 | 14.94 | 57.13 |
管理员操作日志 /wp-admin/admin.php?page=mpoplogs_menuIndex | 796 | 2.02 | 24.86 | 44.52 |
日志列表 /wp-admin/admin.php?page=operationLog | 779 | 1.43 | 12.40 | 48.46 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
- Zombie WordPress options were found after uninstall: 6 options
- can_compress_scripts
- theysaidso_admin_options
- widget_theysaidso_widget
- db_upgraded
- widget_recent-comments
- widget_recent-posts
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
The smoke test was a success, however most plugin functionality was not tested
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
The following issues need your attention
- 2× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/mpoperationlogs/template/logsList.php
- > /wp-content/plugins/mpoperationlogs/template/ipsList.php
- 11× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Notice
Undefined variable: data in wp-content/plugins/mpoperationlogs/template/loglist_td.php on line 1
- > PHP Fatal error
require_once(): Failed opening required 'lib/OperationlogBase.php' (include_path='.:/usr/share/php') in wp-content/plugins/mpoperationlogs/lib/MpIpLogs.class.php on line 2
- > PHP Fatal error
require_once(): Failed opening required 'lib/OperationlogBase.php' (include_path='.:/usr/share/php') in wp-content/plugins/mpoperationlogs/lib/MpLogs.class.php on line 2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mpoperationlogs/dispatcher.php:2
- > PHP Notice
Undefined variable: admin_ajax_url in wp-content/plugins/mpoperationlogs/template/logsList.php on line 45
- > PHP Warning
require_once(lib/OperationlogBase.php): failed to open stream: No such file or directory in wp-content/plugins/mpoperationlogs/lib/MpLogs.class.php on line 2
- > PHP Notice
Undefined variable: mrpengRoot in wp-content/plugins/mpoperationlogs/lib/MpLogs.class.php on line 2
- > PHP Warning
require_once(lib/OperationlogBase.php): failed to open stream: No such file or directory in wp-content/plugins/mpoperationlogs/lib/MpIpLogs.class.php on line 2
- > PHP Notice
Undefined variable: data in wp-content/plugins/mpoperationlogs/template/ipslist_td.php on line 1
- > PHP Notice
Undefined variable: mrpengRoot in wp-content/plugins/mpoperationlogs/lib/MpIpLogs.class.php on line 2
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: ip record, ip address, operation log
mpoperationlogs/mpOperationLogs.php 92% from 13 tests
The primary PHP file in "mpOperationLogs" version 1.0.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("mpoperationlogs.php" instead of "mpOperationLogs.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin818 lines of code in 12 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 12 | 113 | 39 | 818 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.27 |
Average class complexity | 10.75 |
▷ Minimum class complexity | 4.00 |
▷ Maximum class complexity | 18.00 |
Average method complexity | 2.15 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 8.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 1 | 25.00% |
▷ Concrete classes | 3 | 75.00% |
▷ Final classes | 0 | 0.00% |
Methods | 34 | |
▷ Static methods | 1 | 2.94% |
▷ Public methods | 27 | 79.41% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 7 | 20.59% |
Functions | 20 | |
▷ Named functions | 18 | 90.00% |
▷ Anonymous functions | 2 | 10.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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
No PNG files were detected