67% spyrowebz-gallery

Code Review | Plugin Name: SWS Gallery

WordPress plugin Plugin Name: SWS Galleryscored67%from 54 tests.

About plugin

  • Plugin page: spyrowebz-gallery
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 6.3.1
  • First release: Jun 4, 2014
  • Latest release: Dec 19, 2016
  • Number of updates: 35
  • Update frequency: every 26.5 days
  • Top authors: sultan_semmai@yahoo.com (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active /2,655 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.71MB] [CPU: ▼51.47ms] Passed 4 tests

An overview of server-side resources used by Plugin Name: SWS Gallery
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.188.68 ▼31.91
Dashboard /wp-admin2.29 ▼1.0112.00 ▼39.11
Posts /wp-admin/edit.php2.30 ▼1.0611.81 ▼38.63
Add New Post /wp-admin/post-new.php2.30 ▼3.5911.29 ▼96.23
Media Library /wp-admin/upload.php2.30 ▼0.939.50 ▼29.49
SWS Gallery /wp-admin/edit.php?post_type=sws-gallery2.3011.32
Add New Gallery /wp-admin/post-new.php?post_type=sws-gallery2.3010.59

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Plugin Name: SWS Gallery
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,963 ▲20213.81 ▼0.859.25 ▲7.4756.75 ▲16.07
Dashboard /wp-admin2,222 ▲485.64 ▲0.0489.15 ▼8.4139.02 ▼6.65
Posts /wp-admin/edit.php2,127 ▲242.02 ▼0.0940.66 ▼3.0036.27 ▼1.61
Add New Post /wp-admin/post-new.php1,549 ▲2123.32 ▲0.22653.85 ▼18.8855.03 ▲0.78
Media Library /wp-admin/upload.php1,427 ▲274.24 ▲0.04102.93 ▼10.8443.51 ▼3.48
SWS Gallery /wp-admin/edit.php?post_type=sws-gallery1,1301.9430.2532.34
Add New Gallery /wp-admin/post-new.php?post_type=sws-gallery2,5127.78173.1766.31

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
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function register_taxonomy was called incorrectly. Taxonomy names must be between 1 and 32 characters in length. Please see Debugging in WordPress for more information. (This message was added in version 4.2.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=sws-gallery
    • > User notice in wp-includes/functions.php+5905
    Function register_taxonomy was called incorrectly. Taxonomy names must be between 1 and 32 characters in length. Please see Debugging in WordPress for more information. (This message was added in version 4.2.0.)

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/spyrowebz-gallery/spyrowebz-gallery.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Contributors: Plugin contributors field is missing
  • Plugin Name: Please specify the plugin name on the first line ( === Plugin Name: SWS Gallery=== )
  • Screenshots: These screenshots need descriptions #0, #0 in spyrowebz-gallery/assets to your readme.txt
The official readme.txt might help

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

"Plugin Name: SWS Gallery" version 1.3.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
123 characters long description:
A plugin which Create a galley, the gallery show in popup slider when click on a single image. use [sws_gallery] shortcode.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin9,069 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
CSS4978758,533
SVG100399
PHP1318127
JavaScript20110

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.05
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 1.71MB with 1.26MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot2.png919.62KB265.31KB▼ 71.15%
screenshot1.png831.01KB199.43KB▼ 76.00%