83% wp-slim-gallery

Code Review | WP Slim Gallery

WordPress plugin WP Slim Gallery scored 83% from 54 tests.

About plugin

  • Plugin page: wp-slim-gallery
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.2
  • WordPress version: 5.8.1
  • First release: Aug 10, 2016
  • Latest release: Aug 22, 2016
  • Number of updates: 12
  • Update frequency: every 11.8 days
  • Top authors: infodesignbd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 728 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.05MB] [CPU: ▼142.48ms] Passed 4 tests

Server-side resources used by WP Slim Gallery
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.0634.40 ▼1.88
Dashboard /wp-admin3.12 ▲0.0639.10 ▼8.59
Posts /wp-admin/edit.php3.17 ▲0.0643.25 ▼2.22
Add New Post /wp-admin/post-new.php5.48 ▲0.0592.06 ▼553.14
Media Library /wp-admin/upload.php3.06 ▲0.0536.13 ▼5.96
Add New /wp-admin/post-new.php?post_type=slim_post3.1251.90
Category /wp-admin/edit-tags.php?taxonomy=slimgl_post_cat&post_type=slim_post3.0531.79
WP Slim Gallery /wp-admin/edit.php?post_type=slim_post3.1035.42

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 1 new option
New WordPress options
widget_wpslimgl

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Slim Gallery
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,128 ▲53216.04 ▲0.4919.68 ▲11.2744.98 ▼0.62
Dashboard /wp-admin3,007 ▲765.97 ▼0.22144.54 ▼9.30114.37 ▲1.60
Posts /wp-admin/edit.php2,779 ▲402.72 ▲0.0065.12 ▼1.4085.98 ▼1.73
Add New Post /wp-admin/post-new.php1,698 ▲2818.76 ▼0.40400.68 ▼10.28106.71 ▼1.76
Media Library /wp-admin/upload.php1,847 ▲405.04 ▼0.04153.17 ▲2.73113.26 ▼5.56
Add New /wp-admin/post-new.php?post_type=slim_post2,3484.56104.4283.30
Category /wp-admin/edit-tags.php?taxonomy=slimgl_post_cat&post_type=slim_post1,7912.4058.2577.29
WP Slim Gallery /wp-admin/edit.php?post_type=slim_post1,4552.6461.6072.07

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_wpslimgl

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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 take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-slim-gallery/widget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-slim-gallery/widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Contributors: Plugin contributors field is missing
  • Screenshots: Add a description for screenshot #3 in wp-slim-gallery/assets to your readme.txt
Please take inspiration from this readme.txt

wp-slim-gallery/wpslimgallery.php 85% from 13 tests

"WP Slim Gallery" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-slim-gallery.php" instead of "wpslimgallery.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 153 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin311 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS2322163
PHP22639140
JavaScript1168

PHP code Passed 2 tests

A short 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.13
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity2.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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin