88% alobaidi-gallery

Code Review | Alobaidi Gallery

WordPress plugin Alobaidi Gallery scored 88% from 54 tests.

About plugin

  • Plugin page: alobaidi-gallery
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.6
  • WordPress version: 5.9.2
  • First release: Jan 23, 2016
  • Latest release: Aug 21, 2016
  • Number of updates: 21
  • Update frequency: every 10.1 days
  • Top authors: Alobaidi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 896 total downloads


Plugin footprint Passed 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.05MB] [CPU: ▼292.06ms] Passed 4 tests

A check of server-side resources used by Alobaidi Gallery
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1350.89 ▲2.47
Dashboard /wp-admin3.48 ▲0.0834.78 ▲1.71
Posts /wp-admin/edit.php3.72 ▲0.0838.21 ▲1.87
Add New Post /wp-admin/post-new.php6.96 ▼0.0194.31 ▼1,169.76
Media Library /wp-admin/upload.php3.37 ▲0.0725.73 ▼2.06
Alobaidi Gallery /wp-admin/plugins.php?page=alobaidi_gallery_settings3.3427.29

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 56 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Alobaidi Gallery
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,800 ▲5616.18 ▲0.535.99 ▼0.373.31 ▲1.24
Dashboard /wp-admin2,897 ▲466.11 ▼0.07119.06 ▼33.58156.96 ▼4.93
Posts /wp-admin/edit.php2,696 ▲113.24 ▼0.0062.48 ▼0.04146.24 ▲2.20
Add New Post /wp-admin/post-new.php1,776 ▲10821.70 ▲3.55465.46 ▲81.52160.09 ▼0.37
Media Library /wp-admin/upload.php1,703 ▲55.49 ▼0.04139.98 ▼5.57189.04 ▼2.47
Alobaidi Gallery /wp-admin/plugins.php?page=alobaidi_gallery_settings1,3142.3753.16123.79

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% 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 0% 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 fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/alobaidi-gallery/alobaidi-gallery.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/alobaidi-gallery/template/gallery_page.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/alobaidi-gallery/settings.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_query_var() in wp-content/plugins/alobaidi-gallery/template/loop.php:3

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


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
These attributes need to be fixed:
  • Tags: You are using too many tags: 25 tag instead of maximum 10
You can take inspiration from this readme.txt

alobaidi-gallery/alobaidi-gallery.php 92% from 13 tests

The main PHP file in "Alobaidi Gallery" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 166 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected2,488 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions23100.00%
▷ Anonymous functions00.00%
▷ 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
19 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings