84% wpgalleria

Code Review | Wordpress Galleria

WordPress plugin Wordpress Galleria scored84%from 54 tests.

About plugin

  • Plugin page: wpgalleria
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.6
  • WordPress version: 6.3.1
  • First release: Sep 14, 2013
  • Latest release: Feb 19, 2014
  • Number of updates: 4
  • Update frequency: every 39.8 days
  • Top authors: kennethrapp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,478 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.44ms] Passed 4 tests

This is a short check of server-side resources used by Wordpress Galleria
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.24 ▼2.08
Dashboard /wp-admin3.33 ▲0.0252.86 ▲2.70
Posts /wp-admin/edit.php3.38 ▲0.0247.43 ▼1.25
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.06 ▼17.11
Media Library /wp-admin/upload.php3.25 ▲0.0239.15 ▲8.34

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Wordpress Galleria
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲14413.48 ▼0.8713.38 ▲11.4641.82 ▲2.64
Dashboard /wp-admin2,195 ▲185.62 ▲0.0984.03 ▼11.0440.07 ▼2.39
Posts /wp-admin/edit.php2,100 ▼01.98 ▲0.0238.70 ▲0.3433.96 ▼7.19
Add New Post /wp-admin/post-new.php1,526 ▼023.35 ▼0.25616.18 ▼70.4449.81 ▲3.33
Media Library /wp-admin/upload.php1,403 ▲34.17 ▼0.0596.53 ▼9.4342.26 ▼4.48

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wpgalleria/wpgalleria.php:162

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: galleria, gallery, image

wpgalleria/wpgalleria.php Passed 13 tests

The principal PHP file in "Wordpress Galleria" v. 1.0.1 is loaded by WordPress automatically on each request
66 characters long description:
Simple implementation of Galleria 1.9 into WordPress (Galleria.io)

Code Analysis Passed 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
No dangerous file extensions were detected4,881 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript111,6921,1124,273
HTML45415272
CSS131213
PHP12616123

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.35
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.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
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/galleria/themes/classic/classic-map.png1.80KB0.67KB▼ 62.77%