Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲1.69MB] [CPU: ▼131.84ms] Passed 4 tests
Server-side resources used by CP Image Gallery
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.55 ▲1.83 | 46.22 ▲22.30 |
Dashboard /wp-admin | 4.86 ▲1.81 | 63.89 ▲19.73 |
Posts /wp-admin/edit.php | 4.98 ▲1.86 | 61.37 ▲6.95 |
Add New Post /wp-admin/post-new.php | 6.76 ▲1.33 | 94.06 ▼566.92 |
Media Library /wp-admin/upload.php | 4.80 ▲1.80 | 50.27 ▲12.90 |
Freemius Debug [v.1.2.1] /wp-admin/admin.php?page=freemius | 4.85 | 39.75 |
Add New /wp-admin/post-new.php?post_type=cpgallery | 4.80 | 53.85 |
All CP Galleries /wp-admin/edit.php?post_type=cpgallery | 4.84 | 48.61 |
Server storage [IO: ▲2.14MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 304 new files
Database: no new tables, 4 new options
New WordPress options |
---|
fs_api_cache |
fs_debug_mode |
fs_active_plugins |
fs_accounts |
Browser metrics Passed 4 tests
Checking browser requirements for CP Image Gallery
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,793 ▲156 | 15.87 ▲0.28 | 11.44 ▲2.02 | 47.93 ▼6.96 |
Dashboard /wp-admin | 3,052 ▲121 | 5.95 ▼0.25 | 154.23 ▼22.26 | 133.46 ▲11.68 |
Posts /wp-admin/edit.php | 2,823 ▲84 | 2.73 ▲0.02 | 76.27 ▲0.61 | 116.07 ▲8.74 |
Add New Post /wp-admin/post-new.php | 1,636 ▼47 | 17.31 ▼1.43 | 378.97 ▼6.05 | 116.79 ▼3.89 |
Media Library /wp-admin/upload.php | 1,889 ▲82 | 5.06 ▲0.03 | 161.41 ▲4.73 | 150.52 ▲18.12 |
Freemius Debug [v.1.2.1] /wp-admin/admin.php?page=freemius | 1,373 | 2.11 | 59.59 | 89.06 |
Add New /wp-admin/post-new.php?post_type=cpgallery | 3,079 | 8.94 | 232.21 | 157.18 |
All CP Galleries /wp-admin/edit.php?post_type=cpgallery | 1,490 | 2.66 | 65.31 | 98.19 |
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
It is recommended to fix the following
- Zombie WordPress options detected upon uninstall: 4 options
- fs_debug_mode
- fs_accounts
- fs_api_cache
- fs_active_plugins
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
- > GET request to /wp-admin/post-new.php?post_type=cpgallery
- > Notice in wp-content/plugins/cp-image-gallery/inc/metabox.php+16
Undefined index: cp_seometabox
SRP 50% 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
- 3× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cp-image-gallery/inc/admin-page.php:17
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cp-image-gallery/inc/cp-gallery.php:49
- > PHP Fatal error
Uncaught Error: Call to undefined function get_header() in wp-content/plugins/cp-image-gallery/inc/single-cpgallery.php:6
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: commercepundit, image gallery, simple, galleries, image...
cp-image-gallery/cp-image-gallery.php 92% from 13 tests
The main PHP script in "CP Image Gallery" version 1.0.1 is automatically included on every request by WordPress
The following require your attention:
- Description: The description should be shorter than 140 characters (currently 147 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin19,358 lines of code in 123 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 78 | 3,257 | 7,590 | 13,609 |
PO File | 4 | 734 | 765 | 1,809 |
Sass | 15 | 248 | 80 | 1,558 |
JavaScript | 8 | 383 | 126 | 1,445 |
CSS | 13 | 73 | 33 | 682 |
Markdown | 1 | 59 | 0 | 191 |
JSON | 2 | 0 | 0 | 42 |
YAML | 2 | 2 | 0 | 22 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.52 |
Average class complexity | 41.49 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 943.00 |
Average method complexity | 3.41 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 73.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 71 | |
▷ Abstract classes | 4 | 5.63% |
▷ Concrete classes | 67 | 94.37% |
▷ Final classes | 0 | 0.00% |
Methods | 1,243 | |
▷ Static methods | 172 | 13.84% |
▷ Public methods | 909 | 73.13% |
▷ Protected methods | 24 | 1.93% |
▷ Private methods | 310 | 24.94% |
Functions | 146 | |
▷ Named functions | 146 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 186 | |
▷ Global constants | 152 | 81.72% |
▷ Class constants | 34 | 18.28% |
▷ Public constants | 34 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
48 compressed PNG files occupy 0.09MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
inc/lib/images/prettyPhoto/facebook/contentPatternLeft.png | 0.13KB | 0.10KB | ▼ 24.82% |
inc/lib/fancybox/fancy_nav_right.png | 1.42KB | 1.66KB | 0.00% |
inc/lib/images/prettyPhoto/dark_rounded/contentPattern.png | 0.13KB | 0.09KB | ▼ 25.38% |
inc/lib/fancybox/fancy_title_over.png | 0.07KB | 0.09KB | 0.00% |
inc/lib/fancybox/fancy_shadow_nw.png | 0.32KB | 0.47KB | 0.00% |