90% gallery-styles

Code Review | Gallery Styles

WordPress plugin Gallery Styles scored90%from 54 tests.

About plugin

  • Plugin page: gallery-styles
  • Plugin version: 1.2.6
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4
  • WordPress version: 6.3.1
  • First release: Dec 29, 2022
  • Latest release: Dec 2, 2023
  • Number of updates: 20
  • Update frequency: every 16.9 days
  • Top authors: Kometschuh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,573 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.75ms] Passed 4 tests

Server-side resources used by Gallery Styles
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.80 ▼4.86
Dashboard /wp-admin3.32 ▲0.0244.78 ▼1.87
Posts /wp-admin/edit.php3.37 ▲0.0245.20 ▼1.51
Add New Post /wp-admin/post-new.php5.85 ▼0.0483.78 ▼10.76
Media Library /wp-admin/upload.php3.25 ▲0.0238.89 ▲4.42

Server storage [IO: ▲1.01MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Gallery Styles
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3014.27 ▼0.121.64 ▼0.0842.55 ▼0.91
Dashboard /wp-admin2,198 ▲185.60 ▼0.02114.00 ▲17.5945.49 ▼1.16
Posts /wp-admin/edit.php2,100 ▼31.95 ▲0.0039.73 ▼0.6937.17 ▲1.10
Add New Post /wp-admin/post-new.php1,694 ▲16822.18 ▼1.07651.47 ▲83.7747.15 ▼14.84
Media Library /wp-admin/upload.php1,397 ▼04.18 ▼0.0095.01 ▼3.7139.46 ▼1.83

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: gallery, block, sort

gallery-styles/gallery-styles.php 92% from 13 tests

"Gallery Styles" version 1.2.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected23,412 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JSON31023,371
PHP2152738
CSS2002
JavaScript1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.84
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin