73% enhanced-wp-gallery

Code Review | Enhanced WP Gallery

WordPress plugin Enhanced WP Gallery scored73%from 54 tests.

About plugin

  • Plugin page: enhanced-wp-gallery
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4.2
  • WordPress version: 6.3.1
  • First release: Oct 22, 2012
  • Latest release: Oct 22, 2012
  • Number of updates: 31
  • Update frequency: N/A
  • Top authors: ronimarinkovic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,402 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.23MB] [CPU: ▼43.35ms] Passed 4 tests

An overview of server-side resources used by Enhanced WP Gallery
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.74 ▼0.7216.76 ▼30.02
Dashboard /wp-admin2.78 ▼0.5218.07 ▼35.83
Posts /wp-admin/edit.php2.78 ▼0.5718.01 ▼31.32
Add New Post /wp-admin/post-new.php2.78 ▼3.1016.88 ▼76.24
Media Library /wp-admin/upload.php2.78 ▼0.4515.99 ▼19.51

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Enhanced WP Gallery: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.27 ▲0.051.94 ▼0.1343.65 ▼4.12
Dashboard /wp-admin2,195 ▲185.58 ▲0.0788.11 ▼15.0842.27 ▼2.29
Posts /wp-admin/edit.php2,100 ▼02.15 ▲0.1638.52 ▲2.6235.41 ▼3.18
Add New Post /wp-admin/post-new.php1,526 ▼223.19 ▲0.07634.93 ▼70.0651.07 ▼4.19
Media Library /wp-admin/upload.php1,400 ▲34.14 ▼0.07100.27 ▼18.7441.75 ▼8.86

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Enhanced_WP_Gallery::init() should not be called statically
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/enhanced-wp-gallery/enhanced-wp-galery.php:15

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === enhanced-wp-gallery === )
Please take inspiration from this readme.txt

enhanced-wp-gallery/enhanced-wp-galery.php 85% from 13 tests

The primary PHP file in "Enhanced WP Gallery" version 0.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("enhanced-wp-gallery.php" instead of "enhanced-wp-galery.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 198 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
Everything looks great! No dangerous files found in this plugin122 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12619122

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity8.33
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin