Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
- Install procedure validation failed for this plugin
- > Warning in wp-content/plugins/gif-animation-preview/plugin.php+41
Use of undefined constant GAP_HOVER_METADATA_NAME - assumed 'GAP_HOVER_METADATA_NAME' (this will throw an Error in a future version of PHP)
Server metrics [RAM: ▲0.06MB] [CPU: ▼12.16ms] Passed 4 tests
Analyzing server-side resources used by GIF Animation Preview
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.55 ▲0.09 | 45.48 ▼2.13 |
Dashboard /wp-admin | 3.36 ▲0.06 | 51.52 ▼8.70 |
Posts /wp-admin/edit.php | 3.41 ▲0.06 | 51.56 ▼0.90 |
Add New Post /wp-admin/post-new.php | 5.94 ▲0.06 | 92.03 ▼34.63 |
Media Library /wp-admin/upload.php | 3.28 ▲0.06 | 35.40 ▼3.16 |
GIF Animation Preview /wp-admin/options-general.php?page=gap-setting | 3.25 | 35.01 |
Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 12 new options
New WordPress options |
---|
gap-effect |
gap-mobile |
gap-thumbnail |
theysaidso_admin_options |
widget_recent-comments |
widget_theysaidso_widget |
gap-hover |
GAP_HOVER_METADATA_NAME |
can_compress_scripts |
gap-type |
... |
Browser metrics Passed 4 tests
Checking browser requirements for GIF Animation Preview
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,813 ▲24 | 14.48 ▲1.26 | 2.25 ▲0.34 | 41.41 ▼4.60 |
Dashboard /wp-admin | 2,210 ▲7 | 5.85 ▼0.05 | 105.73 ▼10.23 | 39.07 ▼4.51 |
Posts /wp-admin/edit.php | 2,093 ▲4 | 1.98 ▼0.04 | 40.07 ▼5.97 | 34.57 ▼6.86 |
Add New Post /wp-admin/post-new.php | 1,517 ▼16 | 17.62 ▼5.41 | 631.44 ▼33.68 | 44.42 ▼15.75 |
Media Library /wp-admin/upload.php | 1,392 ▲10 | 4.19 ▼0.04 | 96.23 ▼1.62 | 42.25 ▼0.82 |
GIF Animation Preview /wp-admin/options-general.php?page=gap-setting | 940 | 2.05 | 22.51 | 42.49 |
Uninstaller [IO: ✅] [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
- The uninstall procedure has failed, leaving 7 options in the database
- GAP_HOVER_METADATA_NAME
- widget_recent-comments
- widget_recent-posts
- db_upgraded
- theysaidso_admin_options
- can_compress_scripts
- widget_theysaidso_widget
Smoke tests 75% 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)
Even though everything seems fine, this is not an exhaustive test
SRP 50% 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
Please take a closer look at the following
- 1× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/gif-animation-preview/plugin.php:21
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
- Plugin Name: You should set the name of your plugin on the first line (
=== gif-animation-preview ===
)
gif-animation-preview/plugin.php 92% from 13 tests
The primary PHP file in "GIF Animation Preview" version 1.10.3 is used by WordPress to initiate all plugin functionality
The following require your attention:
- Main file name: Name the main plugin file the same as the plugin slug ("gif-animation-preview.php" instead of "plugin.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin409 lines of code in 6 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 3 | 55 | 32 | 406 |
JavaScript | 2 | 1 | 5 | 2 |
CSS | 1 | 0 | 0 | 1 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.31 |
Average class complexity | 23.50 |
▷ Minimum class complexity | 10.00 |
▷ Maximum class complexity | 37.00 |
Average method complexity | 2.55 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 11.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 29 | |
▷ Static methods | 2 | 6.90% |
▷ Public methods | 28 | 96.55% |
▷ Protected methods | 1 | 3.45% |
▷ Private methods | 0 | 0.00% |
Functions | 2 | |
▷ Named functions | 2 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 9 | |
▷ Global constants | 9 | 100.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
PNG images were not found in this plugin