84% gallery-sharing

Code Review | Gallery Sharing

WordPress plugin Gallery Sharing scored84%from 54 tests.

About plugin

  • Plugin page: gallery-sharing
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5.3
  • WordPress version: 6.3.1
  • First release: Jun 9, 2015
  • Latest release: Jul 13, 2016
  • Number of updates: 7
  • Update frequency: every 97.3 days
  • Top authors: EdwardBock (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /936 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.49ms] Passed 4 tests

A check of server-side resources used by Gallery Sharing
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.56 ▲1.73
Dashboard /wp-admin3.32 ▲0.0245.80 ▼8.96
Posts /wp-admin/edit.php3.37 ▲0.0245.86 ▼1.09
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.94 ▲0.78
Media Library /wp-admin/upload.php3.24 ▲0.0235.19 ▼0.70
Gallery Sharing /wp-admin/options-general.php?page=settings-gallery-sharing3.2137.09

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Gallery Sharing
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲7213.27 ▼1.101.80 ▲0.1243.37 ▼0.83
Dashboard /wp-admin2,216 ▲254.90 ▼0.00110.84 ▲8.6840.75 ▲0.57
Posts /wp-admin/edit.php2,096 ▲72.00 ▲0.0140.12 ▲0.5435.86 ▲2.38
Add New Post /wp-admin/post-new.php1,534 ▲2017.61 ▲0.19685.63 ▼1.3737.60 ▼19.10
Media Library /wp-admin/upload.php1,395 ▲74.21 ▲0.0093.72 ▼7.0441.90 ▼7.78
Gallery Sharing /wp-admin/options-general.php?page=settings-gallery-sharing8022.0323.1625.02

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means 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 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: Using $this when not in object context in wp-content/plugins/gallery-sharing/public/partials/shared-gallery.tpl.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Gallery_Sharing_Options' not found in wp-content/plugins/gallery-sharing/admin/partials/gallery-sharing-modal.tpl.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: sharing, gallery

gallery-sharing/ph-gallery-sharing.php 92% from 13 tests

The principal PHP file in "Gallery Sharing" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("gallery-sharing.php" instead of "ph-gallery-sharing.php")

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
Good job! No executable or dangerous file extensions detected655 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP12137343450
JavaScript12268108
CSS1122284
SVG10013

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity5.00
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity1.76
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods42
▷ Static methods24.76%
▷ Public methods3480.95%
▷ Protected methods00.00%
▷ Private methods819.05%
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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin