77% webplus-gallery

Code Review | WebPlus Gallery on Wordpress

WordPress plugin WebPlus Gallery on Wordpress scored77%from 54 tests.

About plugin

  • Plugin page: webplus-gallery
  • Plugin version: 1.5.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 6, 2020
  • Latest release: Apr 18, 2021
  • Number of updates: 38
  • Update frequency: every 6.7 days
  • Top authors: borysenko (100%)

Code review

54 tests

User reviews

22 reviews

Install metrics

10+ active /774 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼7.34ms] Passed 4 tests

Analyzing server-side resources used by WebPlus Gallery on Wordpress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.83 ▲0.40
Dashboard /wp-admin3.38 ▲0.0352.91 ▼10.78
Posts /wp-admin/edit.php3.50 ▲0.1455.08 ▲2.18
Add New Post /wp-admin/post-new.php5.97 ▲0.0888.79 ▼14.23
Media Library /wp-admin/upload.php3.28 ▲0.0534.95 ▼4.75
WebPlus Gallery /wp-admin/edit.php?post_type=webplusgallery3.3544.57
Create Gallery /wp-admin/post-new.php?post_type=webplusgallery3.3445.58
Pro version /wp-admin/edit.php?post_type=webplusgallery&page=pro-webplusgallery-version3.2840.11

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 41 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for WebPlus Gallery on Wordpress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,960 ▲21414.43 ▲0.051.84 ▲0.0543.44 ▲3.33
Dashboard /wp-admin2,366 ▲1896.18 ▲0.50122.12 ▲33.7439.60 ▼1.05
Posts /wp-admin/edit.php2,293 ▲1963.37 ▲1.3554.27 ▲17.5435.38 ▲0.41
Add New Post /wp-admin/post-new.php6,242 ▲4,71118.94 ▼4.12934.24 ▲235.1940.34 ▼14.44
Media Library /wp-admin/upload.php1,434 ▲344.14 ▼0.0582.74 ▼26.4845.00 ▼0.36
WebPlus Gallery /wp-admin/edit.php?post_type=webplusgallery1,2763.3850.0031.65
Create Gallery /wp-admin/post-new.php?post_type=webplusgallery1,6953.5768.2937.32
Pro version /wp-admin/edit.php?post_type=webplusgallery&page=pro-webplusgallery-version9863.2637.6923.16

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=webplusgallery
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/webplus-gallery/include/WPThumb/wpthumb.watermark.php:79
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/webplus-gallery/include/WPThumb/wpthumb.background-fill.php:146
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/webplus-gallery/include/WPThumb/wpthumb.shortcodes.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/webplus-gallery/include/WPThumb/wpthumb.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Image_Editor_GD' not found in wp-content/plugins/webplus-gallery/include/WPThumb/wpthumb.image-editor.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/webplus-gallery/include/WPThumb/wpthumb.crop-from-position.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Stable tag: No string
  • Screenshots: These screenshots need descriptions #1, #2 in webplus-gallery/assets to your readme.txt
  • Requires at least: Version format is invalid
You can look at the official readme.txt

webplus-gallery/plugin.php 92% from 13 tests

The primary PHP file in "WebPlus Gallery on Wordpress" version 1.5.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("webplus-gallery.php" instead of "plugin.php")

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
No dangerous file extensions were detected11,869 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
JSON3007,335
CSS576871,687
JavaScript9781441,533
PHP144423501,174
Sass3121123
Markdown18017

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.36
Average class complexity11.45
▷ Minimum class complexity1.00
▷ Maximum class complexity66.00
Average method complexity2.95
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods59
▷ Static methods58.47%
▷ Public methods5186.44%
▷ Protected methods00.00%
▷ Private methods813.56%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
js/lightslider/src/img/controls.png2.19KB0.95KB▼ 56.49%