10% gallery-view

Code Review | Gallery View

WordPress plugin Gallery View scored10%from 54 tests.

About plugin

  • Plugin page: gallery-view
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: Jan 5, 2023
  • Latest release: Apr 17, 2023
  • Number of updates: 7
  • Update frequency: every 14.6 days
  • Top authors: GregRoss (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /341 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/gallery-view/includes/class-gallery-view.php+353
    The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence

Server metrics [RAM: ▼1.77MB] [CPU: ▼49.39ms] Passed 4 tests

An overview of server-side resources used by Gallery View
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.22 ▼1.245.65 ▼36.02
Dashboard /wp-admin2.24 ▼1.076.45 ▼43.44
Posts /wp-admin/edit.php2.24 ▼1.125.75 ▼40.44
Add New Post /wp-admin/post-new.php2.24 ▼3.656.03 ▼77.64
Media Library /wp-admin/upload.php2.24 ▼0.994.93 ▼30.97
Gallery /wp-admin/edit.php?page=post_gallery2.246.20

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

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

Browser metrics Passed 4 tests

Gallery View: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲8713.27 ▼1.021.91 ▲0.0738.82 ▼5.84
Dashboard /wp-admin2,211 ▲234.87 ▼0.06113.22 ▼6.4540.01 ▼3.00
Posts /wp-admin/edit.php2,100 ▲112.04 ▲0.0440.61 ▲3.5135.68 ▲2.50
Add New Post /wp-admin/post-new.php1,521 ▼1323.35 ▲0.30680.75 ▼11.3347.99 ▼6.07
Media Library /wp-admin/upload.php1,399 ▲144.23 ▲0.0496.23 ▼10.3844.30 ▼2.65
Gallery /wp-admin/edit.php?page=post_gallery1,0731.6925.9734.24

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/gallery-view/includes/class-gallery-view.php+353
    The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/edit.php?page=post_gallery
    • > Deprecated in wp-content/plugins/gallery-view/includes/class-gallery-view.php+353
    The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?page=post_gallery
    • > Warning in wp-content/plugins/gallery-view/includes/class-gallery-view.php+353
    A non-numeric value encountered

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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gallery-view/includes/class-gallery-view.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
3 plugin tags: gallery, posts, admin

gallery-view/gallery-view.php Passed 13 tests

The primary PHP file in "Gallery View" version 1.2 is used by WordPress to initiate all plugin functionality
44 characters long description:
View posts in a gallery layout in the admin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin461 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2130102326
CSS1175112
JavaScript112023

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity85.00
▷ Minimum class complexity85.00
▷ Maximum class complexity85.00
Average method complexity6.33
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods660.00%
▷ Protected methods00.00%
▷ Private methods440.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin