84% really-simple-gallery-widget

Code Review | Really Simple Gallery Widget

WordPress plugin Really Simple Gallery Widget scored 84% from 54 tests.

About plugin

  • Plugin page: really-simple-gal...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.8.1
  • WordPress version: 6.3.1
  • First release: Jan 27, 2011
  • Latest release: Aug 9, 2017
  • Number of updates: 24
  • Update frequency: every 99.4 days
  • Top authors: helen (62.5%)helenyhou (41.67%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active / 43,787 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.03MB] [CPU: ▼8.61ms] Passed 4 tests

Server-side resources used by Really Simple Gallery Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0338.77 ▼5.47
Dashboard /wp-admin3.33 ▲0.0345.43 ▼4.57
Posts /wp-admin/edit.php3.38 ▲0.0246.42 ▼14.53
Add New Post /wp-admin/post-new.php5.93 ▲0.0483.05 ▼9.87
Media Library /wp-admin/upload.php3.25 ▲0.0237.06 ▲1.37

Server storage [IO: ▲0.03MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_rsgwidget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Really Simple Gallery Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4513.16 ▼1.231.66 ▼0.2839.24 ▼3.00
Dashboard /wp-admin2,208 ▲594.90 ▼0.75107.99 ▲5.7640.73 ▼5.93
Posts /wp-admin/edit.php2,094 ▲22.04 ▲0.0039.18 ▲0.9334.01 ▼0.03
Add New Post /wp-admin/post-new.php1,530 ▼623.09 ▼0.18655.57 ▲23.3350.71 ▼6.93
Media Library /wp-admin/upload.php1,393 ▲54.21 ▼0.0099.79 ▲4.0741.98 ▲0.81

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_rsgwidget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 fix the following items
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/really-simple-gallery-widget/views/widget.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/really-simple-gallery-widget/really-simple-gallery-widget.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/really-simple-gallery-widget/views/form.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/really-simple-gallery-widget/views/widget.php:8
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/really-simple-gallery-widget/views/widget.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: widget, gallery

really-simple-gallery-widget/really-simple-gallery-widget.php 92% from 13 tests

The main file in "Really Simple Gallery Widget" v. 1.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 337 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin408 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP39342387
JavaScript15021

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin