84% simple-galleria-for-wordpress

Code Review | Simple Galleria for WordPress

WordPress plugin Simple Galleria for WordPress scored84%from 54 tests.

About plugin

  • Plugin page: simple-galleria-f...
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.2
  • WordPress version: 6.3.1
  • First release: Dec 21, 2011
  • Latest release: Apr 21, 2015
  • Number of updates: 21
  • Update frequency: every 58.0 days
  • Top authors: benjaminniess (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /17,614 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.82ms] Passed 4 tests

Server-side resources used by Simple Galleria for WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.92 ▲0.12
Dashboard /wp-admin3.32 ▲0.0144.67 ▼1.87
Posts /wp-admin/edit.php3.37 ▲0.0150.94 ▼2.59
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.25 ▼6.95
Media Library /wp-admin/upload.php3.24 ▲0.0136.67 ▲1.98
Simple Galleria /wp-admin/options-general.php?page=simple-galleria-for-wordpress3.2530.16

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Galleria for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,083 ▲32213.80 ▼0.7910.59 ▲8.8939.63 ▼3.62
Dashboard /wp-admin2,255 ▲755.77 ▲0.2684.87 ▼9.9637.50 ▼2.01
Posts /wp-admin/edit.php2,169 ▲692.28 ▲0.2641.54 ▲0.6834.76 ▼3.01
Add New Post /wp-admin/post-new.php1,565 ▲3423.15 ▲0.11602.12 ▼37.1647.44 ▼7.16
Media Library /wp-admin/upload.php1,466 ▲634.36 ▲0.0999.54 ▼1.7442.40 ▼5.10
Simple Galleria /wp-admin/options-general.php?page=simple-galleria-for-wordpress9951.7928.6129.38

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
  • Zombie WordPress options were found after uninstall: 7 options
    • sgwf-options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/simple-galleria-for-wordpress/simple-galleria-for-wordpress.php:12
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/simple-galleria-for-wordpress/views/admin/settings.tpl.php:2

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)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
10 plugin tags: jquery, image, native, slideshow, photo...

simple-galleria-for-wordpress/simple-galleria-for-wordpress.php 92% from 13 tests

The primary PHP file in "Simple Galleria for WordPress" version 2.0.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin2,507 lines of code in 57 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript432143071,275
Markdown12040400
PHP68390316
CSS2712250
HTML1133108
PO File2292888
JSON20070

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity17.67
▷ Minimum class complexity5.00
▷ Maximum class complexity38.00
Average method complexity5.17
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods866.67%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
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
ressources/colorbox/images/controls.png0.49KB0.57KB0.00%
ressources/galleria/themes/classic/classic-map.png1.80KB0.67KB▼ 62.77%