83% awesome-gallery

Code Review | Awesome Gallery

WordPress plugin Awesome Gallery scored83%from 54 tests.

About plugin

  • Plugin page: awesome-gallery
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Feb 18, 2017
  • Latest release: Jun 16, 2019
  • Number of updates: 13
  • Update frequency: every 65.2 days
  • Top authors: raihancse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /9,816 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼11.05ms] Passed 4 tests

Server-side resources used by Awesome Gallery
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0448.09 ▲7.13
Dashboard /wp-admin3.34 ▼0.0144.17 ▼18.64
Posts /wp-admin/edit.php3.39 ▲0.0341.47 ▼5.43
Add New Post /wp-admin/post-new.php5.92 ▲0.0379.17 ▼18.55
Media Library /wp-admin/upload.php3.26 ▲0.0333.63 ▼1.56
Image Gallery /wp-admin/edit.php?post_type=image-gallery3.3033.75
Add New /wp-admin/post-new.php?post_type=image-gallery3.3142.61

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 45 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Awesome Gallery
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲17113.91 ▼0.4911.36 ▲9.6242.55 ▼0.54
Dashboard /wp-admin2,236 ▲485.79 ▲0.73100.87 ▼14.9541.15 ▼6.91
Posts /wp-admin/edit.php2,113 ▲242.03 ▲0.0634.73 ▼2.1233.31 ▼1.56
Add New Post /wp-admin/post-new.php1,556 ▲3723.29 ▲0.03644.15 ▼23.6549.20 ▼3.06
Media Library /wp-admin/upload.php1,409 ▲244.22 ▲0.03101.08 ▲1.1044.84 ▲0.27
Image Gallery /wp-admin/edit.php?post_type=image-gallery1,0771.9929.7729.75
Add New /wp-admin/post-new.php?post_type=image-gallery1,6213.6459.3832.10

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
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/awesome-gallery/gallery.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === awesome-gallery === )
You can look at the official readme.txt

awesome-gallery/gallery.php 85% from 13 tests

"Awesome Gallery" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("awesome-gallery.php" instead of "gallery.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 189 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin259 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS260199
PHP133756
JavaScript2164

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.04
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
27 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/prettyPhoto/light_square/btnNext.png1.38KB1.14KB▼ 17.29%
images/prettyPhoto/dark_square/sprite.png3.42KB2.13KB▼ 37.67%
images/prettyPhoto/default/sprite_next.png1.33KB0.39KB▼ 70.69%
images/prettyPhoto/dark_rounded/sprite.png3.98KB2.56KB▼ 35.79%
images/prettyPhoto/facebook/contentPatternTop.png0.14KB0.11KB▼ 21.13%