84% space-gallery

Code Review | Space gallery

WordPress plugin Space gallery scored84%from 54 tests.

About plugin

  • Plugin page: space-gallery
  • Plugin version: 8.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.1
  • WordPress version: 6.3.1
  • First release: Aug 14, 2010
  • Latest release: Dec 1, 2022
  • Number of updates: 55
  • Update frequency: every 81.8 days
  • Top authors: gopiplus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /8,373 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
This plugin's installer ran successfully

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

An overview of server-side resources used by Space gallery
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.62 ▼8.84
Dashboard /wp-admin3.31 ▲0.0147.80 ▼2.09
Posts /wp-admin/edit.php3.36 ▲0.0144.53 ▼2.57
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.99 ▼12.50
Media Library /wp-admin/upload.php3.23 ▲0.0138.17 ▲4.45
Space gallery /wp-admin/options-general.php?page=space-gallery/space-gallery.php3.2035.77

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: no new tables, 10 new options
New WordPress options
can_compress_scripts
space_dir_2
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
space_dir_3
space_dir_4
space_dir_1
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Space gallery
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲19313.63 ▼0.768.04 ▲6.1643.24 ▼3.55
Dashboard /wp-admin2,213 ▲245.90 ▼0.04102.40 ▼10.9140.14 ▼5.80
Posts /wp-admin/edit.php2,093 ▲42.00 ▲0.0134.03 ▼4.5436.00 ▲1.35
Add New Post /wp-admin/post-new.php1,517 ▼2517.40 ▼0.73700.65 ▲56.9758.20 ▲3.30
Media Library /wp-admin/upload.php1,395 ▲74.23 ▲0.0196.08 ▼1.6544.03 ▲1.54
Space gallery /wp-admin/options-general.php?page=space-gallery/space-gallery.php8472.0423.7229.71

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • 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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/space-gallery/space-gallery.php:182

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: slideshow, space, gallery, image

space-gallery/space-gallery.php 92% from 13 tests

"Space gallery" version 8.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 260 characters long)

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
No dangerous file extensions were detected699 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript31230423
PHP22315165
PO File2262883
CSS20028

PHP code Passed 2 tests

Analyzing 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.16
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%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin