84% om-image-gallery

Code Review | Om image gallery

WordPress plugin Om image galleryscored84%from 54 tests.

About plugin

  • Plugin page: om-image-gallery
  • Plugin version: 1.0.05
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6.0
  • WordPress version: 6.3.1
  • First release: Aug 8, 2016
  • Latest release: Aug 8, 2016
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: siddharthsingh91 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /541 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.00ms] Passed 4 tests

Analyzing server-side resources used by Om image gallery
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0243.27 ▲4.95
Dashboard /wp-admin3.31 ▲0.0147.32 ▼4.13
Posts /wp-admin/edit.php3.37 ▲0.0151.83 ▼2.44
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.80 ▼17.11
Media Library /wp-admin/upload.php3.24 ▲0.0137.95 ▼0.30

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 25 new files
Database: 1 new table, 7 new options
New tables
wp_om_image_gallery_states
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
om_image_gallery_states

Browser metrics Passed 4 tests

This is an overview of browser requirements for Om image gallery
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,993 ▲23213.58 ▼0.7913.82 ▲12.1753.18 ▲10.02
Dashboard /wp-admin2,195 ▲185.65 ▲0.0395.10 ▲4.9139.27 ▼2.00
Posts /wp-admin/edit.php2,100 ▼31.98 ▼0.0038.00 ▼0.0936.09 ▼2.60
Add New Post /wp-admin/post-new.php1,527 ▲123.02 ▼0.22625.65 ▼66.6748.98 ▼10.00
Media Library /wp-admin/upload.php1,400 ▼34.28 ▲0.0996.49 ▼16.4042.19 ▼7.51

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

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
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/om-image-gallery/including_js_css.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_deactivation_hook() in wp-content/plugins/om-image-gallery/include/db.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/om-image-gallery/form_submit.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/om-image-gallery/html_container.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_deactivation_hook() in wp-content/plugins/om-image-gallery/include/db.php:40

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === Om image gallery=== )
The official readme.txt might help

om-image-gallery/index.php 92% from 13 tests

The primary PHP file in "Om image gallery" version 1.0.05 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("om-image-gallery.php" instead of "index.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
Everything looks great! No dangerous files found in this plugin2,567 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
CSS580591,933
JavaScript48588386
PHP63425248

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
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%
Functions9
▷ Named functions9100.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
9 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/thumb-down-hover.png2.33KB1.41KB▼ 39.43%
images/thumb-up-hover.png2.38KB1.40KB▼ 40.94%
images/flag.png1.06KB0.20KB▼ 81.29%
images/thumb-down.png2.28KB1.47KB▼ 35.59%
images/next.png1.32KB1.58KB0.00%