84% simplest-post-image-gallery

Code Review | Simplest Post Image Gallery

WordPress plugin Simplest Post Image Gallery scored84%from 54 tests.

About plugin

  • Plugin page: simplest-post-ima...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.8
  • WordPress version: 6.3.1
  • First release: Sep 23, 2018
  • Latest release: Sep 23, 2018
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: artisare (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /550 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.67MB] [CPU: ▼25.47ms] Passed 4 tests

An overview of server-side resources used by Simplest Post Image Gallery
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.01 ▼3.84
Dashboard /wp-admin3.35 ▲0.0044.93 ▼14.28
Posts /wp-admin/edit.php3.40 ▲0.0447.47 ▼8.94
Add New Post /wp-admin/post-new.php3.13 ▼2.7535.05 ▼74.71
Media Library /wp-admin/upload.php3.27 ▲0.0432.87 ▼3.94

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simplest Post Image Gallery
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.33 ▼1.251.74 ▼0.0844.02 ▼1.96
Dashboard /wp-admin2,207 ▲195.84 ▲0.7397.06 ▼17.5237.20 ▼3.34
Posts /wp-admin/edit.php2,093 ▲42.03 ▲0.0640.54 ▲0.3336.67 ▲2.66
Add New Post /wp-admin/post-new.php6,221 ▲4,70425.83 ▲8.33865.36 ▲216.5665.14 ▲10.30
Media Library /wp-admin/upload.php1,389 ▲44.22 ▲0.01105.78 ▼3.5647.64 ▲0.82

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
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 add_action() in wp-content/plugins/simplest-post-image-gallery/admin/class-simplest-post-image-gallery-admin.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Please fix this invalid url: "artisare.lv/wordpress-plugin"
Please take inspiration from this readme.txt

simplest-post-image-gallery/simplest-post-image-gallery.php Passed 13 tests

Analyzing the main PHP file in "Simplest Post Image Gallery" version 1.0.0
121 characters long description:
Simplest Post/Page image gallery. Attach images to each of the posts. Comes with the basic and intuitive admin interface.

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
Good job! No executable or dangerous file extensions detected166 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3164977
CSS11463
JavaScript10026

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.36MB with 0.27MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png373.46KB93.15KB▼ 75.06%