Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▼0.89MB] [CPU: ▼33.63ms] Passed 4 tests
Analyzing server-side resources used by plagia
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.54 ▲0.08 | 35.91 ▼2.18 |
Dashboard /wp-admin | 3.06 ▼0.25 | 22.55 ▼21.33 |
Posts /wp-admin/edit.php | 3.06 ▼0.30 | 24.49 ▼21.49 |
Add New Post /wp-admin/post-new.php | 3.06 ▼2.83 | 25.85 ▼67.06 |
Media Library /wp-admin/upload.php | 3.06 ▼0.17 | 28.20 ▼24.64 |
check automatique /wp-admin/admin.php?page=plagia-auto | 3.06 | 24.09 |
Server storage [IO: ▲10.80MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 350 new files
Database: 2 new tables, 7 new options
New tables |
---|
wp_plagia_rapports |
wp_plagia_users |
New WordPress options |
---|
widget_recent-posts |
db_upgraded |
can_compress_scripts |
plagiarism_version |
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-comments |
Browser metrics Passed 4 tests
A check of browser resources used by plagia
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,865 ▲130 | 14.12 ▼0.17 | 1.76 ▼0.08 | 28.46 ▼16.36 |
Dashboard /wp-admin | 2,254 ▲66 | 5.63 ▼0.27 | 126.14 ▲28.26 | 46.24 ▲7.49 |
Posts /wp-admin/edit.php | 2,137 ▲51 | 2.49 ▲0.49 | 48.46 ▲12.92 | 41.30 ▲8.95 |
Add New Post /wp-admin/post-new.php | 6,464 ▲4,931 | 28.22 ▲4.81 | 932.17 ▲258.11 | 46.66 ▼7.57 |
Media Library /wp-admin/upload.php | 1,436 ▲48 | 4.93 ▲0.74 | 101.16 ▼11.14 | 44.92 ▼0.56 |
check automatique /wp-admin/admin.php?page=plagia-auto | 1,167 | 2.65 | 51.72 | 36.60 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
- Uninstall procedure had uncaught errors
- > User notice in wp-includes/functions.php+5905
Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)
- This plugin did not uninstall successfully, leaving 7 options in the database
- db_upgraded
- widget_recent-posts
- widget_theysaidso_widget
- widget_recent-comments
- plagiarism_version
- theysaidso_admin_options
- can_compress_scripts
Smoke tests 0% 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)
Smoke test failed, please fix the following
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=plagia-auto
- > User notice in wp-includes/functions.php+5905
Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)
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
Almost there! Just fix the following items
- 1× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/plagia/include/dompdf/lib/php-css-parser/tests/quickdump.php
- 137× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'Svg\\Surface\\SurfaceInterface' not found in wp-content/plugins/plagia/include/dompdf/lib/php-svg-lib/src/Svg/Surface/SurfaceGmagick.php:13
- > PHP Fatal error
Uncaught Error: Class 'Sabberworm\\CSS\\CSSList\\CSSBlockList' not found in wp-content/plugins/plagia/include/dompdf/lib/php-css-parser/lib/Sabberworm/CSS/CSSList/AtRuleBlockList.php:10
- > PHP Fatal error
Uncaught Error: Interface 'Sabberworm\\CSS\\Renderable' not found in wp-content/plugins/plagia/include/dompdf/lib/php-css-parser/lib/Sabberworm/CSS/Value/Value.php:9
- > PHP Fatal error
Uncaught Error: Class 'Sabberworm\\CSS\\Value\\ValueList' not found in wp-content/plugins/plagia/include/dompdf/lib/php-css-parser/lib/Sabberworm/CSS/Value/CSSFunction.php:5
- > PHP Fatal error
Uncaught Error: Class 'FontLib\\TrueType\\TableDirectoryEntry' not found in wp-content/plugins/plagia/include/dompdf/lib/php-font-lib/src/FontLib/OpenType/TableDirectoryEntry.php:16
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\FrameReflower\\AbstractFrameReflower' not found in wp-content/plugins/plagia/include/dompdf/src/FrameReflower/Text.php:21
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\Positioner\\AbstractPositioner' not found in wp-content/plugins/plagia/include/dompdf/src/Positioner/Inline.php:20
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\Positioner\\AbstractPositioner' not found in wp-content/plugins/plagia/include/dompdf/src/Positioner/Absolute.php:16
- > PHP Fatal error
Uncaught Error: Class 'Svg\\Tag\\AbstractTag' not found in wp-content/plugins/plagia/include/dompdf/lib/php-svg-lib/src/Svg/Tag/LinearGradient.php:15
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/plagia/functions.php:9
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
- > GET request to /wp-admin/admin.php?page=plagia-auto
- > Network (severe)
wp-content/plugins/plagia/assets/images/sort_both.png - Failed to load resource: the server responded with a status of 404 (Not Found)
- > GET request to /wp-admin/admin.php?page=plagia-auto
- > Javascript (severe) in unknown
/wp-admin/admin.php?page=plagia-auto 0:1 Uncaught SyntaxError: "[object Object]" is not valid JSON
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: plagiarism, plagiat
plagia/index.php 85% from 13 tests
The principal PHP file in "plagia" v. 0.9.3 is loaded by WordPress automatically on each request
You should first fix the following items:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("plagia.php" instead of "index.php")
- Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin47,489 lines of code in 273 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 197 | 9,101 | 15,457 | 37,669 |
JavaScript | 6 | 2,395 | 7,094 | 7,119 |
CSS | 46 | 144 | 103 | 1,189 |
Markdown | 6 | 265 | 0 | 947 |
XML | 6 | 3 | 2 | 194 |
JSON | 5 | 0 | 0 | 154 |
PO File | 1 | 44 | 47 | 106 |
YAML | 4 | 19 | 2 | 86 |
HTML | 1 | 0 | 0 | 17 |
SVG | 1 | 0 | 0 | 8 |
PHP code 50% from 2 tests
This is a very shot review of cyclomatic complexity and code structure
It is recommended to fix the following
- Method cyclomatic complexity should be reduced to less than 100 (currently 652)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.42 |
Average class complexity | 36.54 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 797.00 |
Average method complexity | 4.34 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 652.00 |
Code structure | ||
---|---|---|
Namespaces | 33 | |
Interfaces | 5 | |
Traits | 0 | |
Classes | 181 | |
▷ Abstract classes | 12 | 6.63% |
▷ Concrete classes | 169 | 93.37% |
▷ Final classes | 0 | 0.00% |
Methods | 2,046 | |
▷ Static methods | 101 | 4.94% |
▷ Public methods | 1,762 | 86.12% |
▷ Protected methods | 210 | 10.26% |
▷ Private methods | 74 | 3.62% |
Functions | 40 | |
▷ Named functions | 25 | 62.50% |
▷ Anonymous functions | 15 | 37.50% |
Constants | 177 | |
▷ Global constants | 3 | 1.69% |
▷ Class constants | 174 | 98.31% |
▷ Public constants | 174 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
include/dompdf/lib/res/broken_image.png | 0.60KB | 0.47KB | ▼ 22.33% |