77% rw-divi-unite-gallery

Code Review | RW Divi Unite Gallery

WordPress plugin RW Divi Unite Gallery scored 77% from 54 tests.

About plugin

  • Plugin page: rw-divi-unite-gal...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7.3
  • WordPress version: 5.8.1
  • First release: Apr 15, 2017
  • Latest release: Apr 6, 2017
  • Number of updates: 10
  • Update frequency: every 11.2 days
  • Top authors: ahmed17 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active / 2,960 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.25MB] [CPU: ▼143.31ms] 75% from 4 tests

An overview of server-side resources used by RW Divi Unite Gallery
Please have a look at the following items
  • CPU: Total CPU usage should be kept under 500.00ms (currently 3,210.87ms on /wp-admin/admin.php?page=rw-divi-unite-gallery)
PageMemory (MB)CPU Time (ms)
Home /3.06 ▲0.3436.81 ▲9.33
Dashboard /wp-admin3.31 ▲0.2547.57 ▲5.37
Posts /wp-admin/edit.php3.36 ▲0.2542.16 ▼0.47
Add New Post /wp-admin/post-new.php5.69 ▲0.2693.33 ▼571.72
Media Library /wp-admin/upload.php3.25 ▲0.2433.06 ▼6.43
RW Divi Unite Gallery /wp-admin/admin.php?page=rw-divi-unite-gallery3.573,210.87

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 255 new files
Database: no new tables, 4 new options
New WordPress options
fs_accounts
fs_api_cache
fs_debug_mode
fs_active_plugins

Browser metrics Passed 4 tests

This is an overview of browser requirements for RW Divi Unite Gallery
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,700 ▲10415.79 ▲0.108.68 ▼4.7545.57 ▼4.67
Dashboard /wp-admin2,994 ▲635.95 ▼0.25138.02 ▼13.84117.05 ▼2.10
Posts /wp-admin/edit.php2,762 ▲232.71 ▼0.0163.98 ▼7.0292.88 ▲1.20
Add New Post /wp-admin/post-new.php1,684 ▲18419.15 ▲0.55387.94 ▲19.33108.36 ▼9.58
Media Library /wp-admin/upload.php1,831 ▲245.02 ▼0.00146.46 ▼10.88131.69 ▲10.67
RW Divi Unite Gallery /wp-admin/admin.php?page=rw-divi-unite-gallery1,2962.1651.20100.54

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 4 options
    • fs_api_cache
    • fs_active_plugins
    • fs_debug_mode
    • fs_accounts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/rw-divi-unite-gallery/freemius/templates/ajax-loader.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rw-divi-unite-gallery/custom-modules/divi-unite-gallery.php:390

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
  • Screenshots: Please describe screenshot #14 in rw-divi-unite-gallery/assets to your readme.txt
You can look at the official readme.txt

rw-divi-unite-gallery/rw-divi-unite-gallery.php Passed 13 tests

The main file in "RW Divi Unite Gallery" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
115 characters long description:
RW Divi Unite Gallery provides Unite Gallery Custom Module for Divi theme and visual page builder by elegantthemes.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin40,808 lines of code in 136 files:
LanguageFilesBlank linesComment linesLines of code
PHP813,8429,24216,513
JavaScript138,3434,81315,587
PO File52,0952,1184,740
Sass18299761,875
CSS17548711,861
Markdown1610192
JSON10040

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 1,111)
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity47.97
▷ Minimum class complexity1.00
▷ Maximum class complexity1,111.00
Average method complexity3.57
▷ Minimum method complexity1.00
▷ Maximum method complexity76.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes37
▷ Abstract classes25.41%
▷ Concrete classes3594.59%
▷ Final classes00.00%
Methods708
▷ Static methods11516.24%
▷ Public methods53175.00%
▷ Protected methods131.84%
▷ Private methods16423.16%
Functions80
▷ Named functions80100.00%
▷ Anonymous functions00.00%
Constants106
▷ Global constants8983.96%
▷ Class constants1716.04%
▷ Public constants17100.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
72 PNG files occupy 0.09MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
unitegallery/images/not_loaded.png0.84KB0.63KB▼ 24.48%
unitegallery/skins/alexis/images/grid_arrow_up.png1.29KB1.59KB0.00%
unitegallery/skins/default/arrows_strip_right.png0.19KB0.12KB▼ 37.19%
unitegallery/skins/default/tile_button_play_pause.png0.57KB0.41KB▼ 26.90%
unitegallery/skins/default/tile_bullets_blue.png0.38KB0.27KB▼ 28.61%