84% gamma-gallery

Code Review | Gamma Gallery

WordPress plugin Gamma Gallery scored84%from 54 tests.

About plugin

  • Plugin page: gamma-gallery
  • Plugin version: 1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.8.1
  • WordPress version: 6.3.1
  • First release: Apr 16, 2013
  • Latest release: Mar 18, 2014
  • Number of updates: 24
  • Update frequency: every 14.0 days
  • Top authors: ezhil (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

70+ active /15,799 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Gamma Gallery
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.90 ▼5.73
Dashboard /wp-admin3.31 ▲0.0044.70 ▼4.93
Posts /wp-admin/edit.php3.36 ▲0.0049.14 ▲1.08
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.69 ▼15.51
Media Library /wp-admin/upload.php3.23 ▲0.0033.80 ▼5.29

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Gamma Gallery
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,879 ▲12214.09 ▼0.306.15 ▲3.6446.03 ▲1.86
Dashboard /wp-admin2,206 ▲154.86 ▼0.04100.33 ▼6.2246.38 ▲1.27
Posts /wp-admin/edit.php2,089 ▲32.03 ▼0.0135.66 ▼0.6532.38 ▼1.36
Add New Post /wp-admin/post-new.php1,537 ▲1823.35 ▲0.13678.13 ▼17.2552.23 ▼2.77
Media Library /wp-admin/upload.php1,388 ▲34.17 ▼0.0596.90 ▼17.3442.37 ▼4.60

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function content_url() in wp-content/plugins/gamma-gallery/gammagallery.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
You can take inspiration from this readme.txt

gamma-gallery/gammagallery.php 92% from 13 tests

The main file in "Gamma Gallery" v. 1.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("gamma-gallery.php" instead of "gammagallery.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected1,530 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript6458251990
CSS37116382
PHP11014106
SVG10052

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected