93% awesome-wp-image-gallery

Code Review | Awesome Wp Image Gallery

WordPress plugin Awesome Wp Image Gallery scored 93% from 54 tests.

About plugin

  • Plugin page: awesome-wp-image-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-5.7
  • WordPress version: 5.8.1
  • First release: Sep 26, 2016
  • Latest release: Mar 22, 2021
  • Number of updates: 18
  • Update frequency: every 91.1 days
  • Top authors: nayon46 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

2,000+ active / 26,900 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼145.29ms] Passed 4 tests

A check of server-side resources used by Awesome Wp Image Gallery
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1541.89 ▲18.36
Dashboard /wp-admin3.09 ▲0.0337.50 ▼10.70
Posts /wp-admin/edit.php3.14 ▲0.0351.01 ▼0.06
Add New Post /wp-admin/post-new.php5.45 ▲0.0297.48 ▼570.19
Media Library /wp-admin/upload.php3.03 ▲0.0335.82 ▼0.20
Add New /wp-admin/post-new.php?post_type=image-gallery3.0946.31
Photo Gallery /wp-admin/edit.php?post_type=image-gallery3.0735.59

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 45 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Awesome Wp Image Gallery
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,830 ▲23416.34 ▲0.9122.55 ▲10.5450.65 ▲1.09
Dashboard /wp-admin2,999 ▲656.06 ▲0.09173.02 ▲18.40116.00 ▲12.39
Posts /wp-admin/edit.php2,774 ▲352.73 ▲0.0272.42 ▲3.8094.40 ▲9.10
Add New Post /wp-admin/post-new.php1,706 ▲2318.06 ▼0.48401.84 ▼15.20105.59 ▼7.22
Media Library /wp-admin/upload.php1,842 ▲355.04 ▲0.02159.51 ▲1.28118.57 ▼1.09
Add New /wp-admin/post-new.php?post_type=image-gallery2,2174.55139.3788.47
Photo Gallery /wp-admin/edit.php?post_type=image-gallery1,4312.6368.3668.42

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

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
Even though everything seems fine, this is not 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× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/awesome-wp-image-gallery/index.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side


Plugin configuration 90% 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
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === awesome-wp-image-gallery === )
You can take inspiration from this readme.txt

awesome-wp-image-gallery/index.php 85% from 13 tests

The principal PHP file in "Awesome Wp Image Gallery" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("awesome-wp-image-gallery.php" instead of "index.php")
  • Description: The description should be shorter than 140 characters (currently 189 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin258 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for 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
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.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
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/default/sprite.png6.53KB3.21KB▼ 50.87%
images/prettyPhoto/dark_rounded/btnPrevious.png1.41KB1.19KB▼ 15.74%
images/prettyPhoto/dark_square/sprite.png3.42KB2.13KB▼ 37.67%
images/prettyPhoto/light_square/btnNext.png1.38KB1.14KB▼ 17.29%
images/prettyPhoto/default/sprite_x.png1.07KB0.11KB▼ 89.79%