78% awesome-gallery-singsys

Code Review | Singsys -Awesome Gallery

WordPress plugin Singsys -Awesome Gallery scored78%from 54 tests.

About plugin

  • Plugin page: awesome-gallery-s...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.3
  • WordPress version: 6.3.1
  • First release: Aug 5, 2015
  • Latest release: Oct 30, 2015
  • Number of updates: 11
  • Update frequency: every 7.9 days
  • Top authors: Singsys (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,054 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.71ms] Passed 4 tests

A check of server-side resources used by Singsys -Awesome Gallery
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.73 ▼7.34
Dashboard /wp-admin3.36 ▲0.0143.91 ▼17.16
Posts /wp-admin/edit.php3.47 ▲0.1145.33 ▼0.10
Add New Post /wp-admin/post-new.php5.94 ▲0.0590.17 ▼6.23
Media Library /wp-admin/upload.php3.28 ▲0.0537.35 ▲0.90
Add Gallery /wp-admin/admin.php?page=singsys_new_gallery3.3333.23
Gallery /wp-admin/admin.php?page=singsys_gallery3.2532.83

Server storage [IO: ▲0.61MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Please try to fix the following items
  • There were 2 files (0.00KB) illegally modified outside of "wp-content/plugins/awesome-gallery-singsys/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/awesome-gallery-singsys/screenshots/Singsys Responsive Slider \342\200\271 Spacious \342\200\224 WordPress 2015-07-24 11-08-37.png"
    • (new file) "wp-content/plugins/awesome-gallery-singsys/screenshots/Add Or Update Slider \342\200\271 Spacious \342\200\224 WordPress 2015-07-24 11-09-24.png"
Filesystem: 14 new files
Database: 2 new tables, 7 new options
New tables
wp_singsys_items
wp_singsys_gallery
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
singsys_gallery_version

Browser metrics Passed 4 tests

Singsys -Awesome Gallery: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,927 ▲18113.66 ▼0.535.26 ▲3.3043.65 ▲0.71
Dashboard /wp-admin2,229 ▲415.83 ▼0.17101.13 ▼13.1539.84 ▼2.32
Posts /wp-admin/edit.php2,112 ▲232.04 ▲0.0534.94 ▼4.6031.60 ▼9.56
Add New Post /wp-admin/post-new.php1,533 ▼017.52 ▼5.61644.32 ▼20.2554.66 ▼2.72
Media Library /wp-admin/upload.php1,411 ▲264.17 ▼0.0195.29 ▼4.7243.75 ▼1.92
Add Gallery /wp-admin/admin.php?page=singsys_new_gallery1,0863.0644.3130.30
Gallery /wp-admin/admin.php?page=singsys_gallery8242.0624.5126.41

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/awesome-gallery-singsys/page/new.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/awesome-gallery-singsys/page/index.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/awesome-gallery-singsys/index.php:19

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=singsys_new_gallery
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/awesome-gallery-singsys/script/media.js:68:31)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=singsys_new_gallery
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: gallery, awesome gallery, responsive gallery

awesome-gallery-singsys/index.php 92% from 13 tests

"Singsys -Awesome Gallery" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("awesome-gallery-singsys.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected790 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP67948547
CSS2183176
JavaScript3291067

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity5.00
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.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 Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.31MB with 0.14MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshots/Add Or Update Slider ‹ Spacious — WordPress 2015-07-24 11-09-24.png258.31KB80.52KB▼ 68.83%
screenshots/Singsys Responsive Slider ‹ Spacious — WordPress 2015-07-24 11-08-37.png53.95KB20.10KB▼ 62.74%
img/close.png0.24KB0.23KB▼ 2.07%