84% yo-gallery

Code Review | Yo Gallery

WordPress plugin Yo Gallery scored84%from 54 tests.

About plugin

  • Plugin page: yo-gallery
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.9
  • WordPress version: 6.3.1
  • First release: Jun 7, 2018
  • Latest release: Jun 7, 2018
  • Number of updates: 2
  • Update frequency: every 12.0 days
  • Top authors: yogallery (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,059 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.11ms] Passed 4 tests

A check of server-side resources used by Yo Gallery
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0536.86 ▼4.37
Dashboard /wp-admin3.36 ▲0.0546.47 ▼8.25
Posts /wp-admin/edit.php3.47 ▲0.1148.26 ▲1.30
Add New Post /wp-admin/post-new.php5.94 ▲0.0586.17 ▼5.13
Media Library /wp-admin/upload.php3.28 ▲0.0534.24 ▲1.68
Yo Gallery /wp-admin/options-general.php?page=yo_gallery_options3.2531.08

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_yogallerywidget
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Yo Gallery: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.52 ▼1.211.66 ▼0.1039.24 ▼20.34
Dashboard /wp-admin2,213 ▲254.90 ▼0.94105.68 ▼10.4239.85 ▼5.71
Posts /wp-admin/edit.php2,093 ▲72.04 ▲0.0235.32 ▼3.6333.42 ▼0.81
Add New Post /wp-admin/post-new.php1,522 ▲823.22 ▲5.62654.04 ▼75.7655.35 ▼3.19
Media Library /wp-admin/upload.php1,389 ▲14.25 ▲0.0394.51 ▼13.8541.35 ▼1.74
Yo Gallery /wp-admin/options-general.php?page=yo_gallery_options8042.0725.1324.79

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_yogallerywidget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/yo-gallery/yo-gallery-widget.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #1 (Gallery - gallery grid)
You can look at the official readme.txt

yo-gallery/yo-gallery.php Passed 13 tests

This is the main PHP file of "Yo Gallery" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
66 characters long description:
modern, stylish, simple and very flexible wordpress gallery plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin1,165 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2173110691
CSS1303262
PHP46036211
SVG1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity9.50
▷ Minimum class complexity5.00
▷ Maximum class complexity14.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods212.50%
▷ Public methods1381.25%
▷ Protected methods00.00%
▷ Private methods318.75%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/icons.png0.71KB0.43KB▼ 39.64%