84% easy-gallery

Code Review | Easy Gallery

WordPress plugin Easy Gallery scored84%from 54 tests.

About plugin

  • Plugin page: easy-gallery
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-3.3.2
  • WordPress version: 6.3.1
  • First release: Apr 29, 2012
  • Latest release: May 3, 2012
  • Number of updates: 4
  • Update frequency: every 1.8 days
  • Top authors: mmenciassi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /5,003 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.00MB] [CPU: ▼4.57ms] Passed 4 tests

A check of server-side resources used by Easy Gallery
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0140.20 ▲3.32
Dashboard /wp-admin3.31 ▲0.0142.89 ▼6.41
Posts /wp-admin/edit.php3.36 ▲0.0043.15 ▼7.95
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.92 ▼6.06
Media Library /wp-admin/upload.php3.23 ▲0.0035.06 ▲2.13

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Easy Gallery
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,885 ▲13913.60 ▼1.048.32 ▲6.6640.73 ▼3.13
Dashboard /wp-admin2,206 ▲214.86 ▼0.9999.05 ▼6.6841.99 ▼0.34
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0635.78 ▼6.9033.46 ▼3.00
Add New Post /wp-admin/post-new.php1,536 ▲323.13 ▼0.32642.33 ▲16.9751.32 ▲0.39
Media Library /wp-admin/upload.php1,388 ▲34.23 ▲0.0399.43 ▲1.5344.06 ▲0.60

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/easy-gallery/easy-gallery.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === easy-gallery === )
The official readme.txt is a good inspiration

easy-gallery/easy-gallery.php Passed 13 tests

The principal PHP file in "Easy Gallery" v. 0.3 is loaded by WordPress automatically on each request
128 characters long description:
A very easy gallery for your posts, pages and custom posts. Carousel and Slideshow with many jQuery effects and thumbs previews.

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
Good job! No executable or dangerous file extensions detected1,688 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript41271941,431
PHP12428118
CSS1164100
PO File26839

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity8.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/arrows.png3.43KB1.59KB▼ 53.60%
images/arrows-nav.png0.47KB0.41KB▼ 11.51%