84% xpand-image-gallery

Code Review | Xpand Image Gallery

WordPress plugin Xpand Image Gallery scored84%from 54 tests.

About plugin

  • Plugin page: xpand-image-gallery
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.1.1
  • WordPress version: 6.3.1
  • First release: Nov 21, 2014
  • Latest release: Apr 13, 2015
  • Number of updates: 18
  • Update frequency: every 9.2 days
  • Top authors: heyestudio (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

60+ active /4,822 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.84ms] Passed 4 tests

A check of server-side resources used by Xpand Image Gallery
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0439.36 ▲0.34
Dashboard /wp-admin3.35 ▲0.0443.76 ▼2.15
Posts /wp-admin/edit.php3.40 ▲0.0445.69 ▼1.26
Add New Post /wp-admin/post-new.php5.93 ▲0.0489.40 ▼4.28
Media Library /wp-admin/upload.php3.27 ▲0.0432.64 ▲1.57
Xpand Gallery /wp-admin/options-general.php?page=xpand-gallery-options3.2431.03

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Xpand Image Gallery: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,894 ▲14813.65 ▼0.656.22 ▲4.3744.77 ▲4.85
Dashboard /wp-admin2,204 ▲135.79 ▲0.8696.00 ▼17.8742.86 ▼2.50
Posts /wp-admin/edit.php2,093 ▲42.02 ▼0.0238.29 ▲4.2535.19 ▼1.89
Add New Post /wp-admin/post-new.php1,545 ▲3118.18 ▲0.53619.12 ▼45.5451.45 ▲0.99
Media Library /wp-admin/upload.php1,395 ▲74.35 ▲0.1195.93 ▼17.7542.86 ▼2.09
Xpand Gallery /wp-admin/options-general.php?page=xpand-gallery-options9282.0624.8128.43

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means 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 fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/xpand-image-gallery/XpandGalleryLite.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: xpand, gallery, grid, image gallery, images...

xpand-image-gallery/XpandGalleryLite.php 92% from 13 tests

The main PHP script in "Xpand Image Gallery" version 1.0.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("xpand-image-gallery.php" instead of "XpandGalleryLite.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
Good job! No executable or dangerous file extensions detected919 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript212496440
CSS12462240
PHP25025239

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
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
Namespaces0
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin