62% no-frills-gallery

Code Review | No Frills Gallery

WordPress plugin No Frills Galleryscored62%from 54 tests.

About plugin

  • Plugin page: no-frills-gallery
  • Plugin version: 1.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8.0
  • WordPress version: 6.3.1
  • First release: Oct 16, 2015
  • Latest release: Jul 27, 2017
  • Number of updates: 52
  • Update frequency: every 12.5 days
  • Top authors: jtibbles (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,694 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: ▲0.09MB] [CPU: ▲0.08ms] Passed 4 tests

An overview of server-side resources used by No Frills Gallery
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0839.67 ▼3.20
Dashboard /wp-admin3.41 ▲0.1155.58 ▼0.18
Posts /wp-admin/edit.php3.53 ▲0.1859.25 ▲7.48
Add New Post /wp-admin/post-new.php5.98 ▲0.09106.35 ▲5.21
Media Library /wp-admin/upload.php3.32 ▲0.0937.15 ▼1.52
NF Gallery /wp-admin/admin.php?page=nfg3.3335.33
Slideshow Shortcode Generator /wp-admin/admin.php?page=nfg_slideshow_shortcode_generator3.3241.99
Album Display Shortcode Generator /wp-admin/admin.php?page=nfg_album_shortcode_generator3.3136.13

Server storage [IO: ▲0.76MB] [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: 31 new files
Database: 2 new tables, 6 new options
New tables
wp_nfg_imgs
wp_nfg_galleries
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

No Frills Gallery: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,978 ▲21714.49 ▼0.151.96 ▼0.5044.33 ▲5.45
Dashboard /wp-admin2,362 ▲1826.13 ▲0.46108.77 ▲14.2940.12 ▼4.15
Posts /wp-admin/edit.php2,290 ▲1903.39 ▲1.4556.34 ▲13.3737.61 ▼0.68
Add New Post /wp-admin/post-new.php1,548 ▲2023.41 ▲0.06647.44 ▼55.0135.85 ▼26.67
Media Library /wp-admin/upload.php1,424 ▲244.20 ▲0.0384.83 ▼29.1844.37 ▼2.82
NF Gallery /wp-admin/admin.php?page=nfg1,1883.3342.0746.02
Slideshow Shortcode Generator /wp-admin/admin.php?page=nfg_slideshow_shortcode_generator1,3102.9948.0633.64
Album Display Shortcode Generator /wp-admin/admin.php?page=nfg_album_shortcode_generator1,1603.1338.8228.15

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie tables were found after uninstall: 2 tables
    • wp_nfg_imgs
    • wp_nfg_galleries
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=nfg
    • > Notice in wp-content/plugins/no-frills-gallery/admin/nfg-edit-album-admin.php+33
    Trying to get property 'thumb' of non-object
    • > GET request to /wp-admin/admin.php?page=nfg
    • > Notice in wp-content/plugins/no-frills-gallery/admin/nfg-edit-album-admin.php+30
    Trying to get property 'nam' of non-object
    • > GET request to /wp-admin/admin.php?page=nfg
    • > Notice in wp-content/plugins/no-frills-gallery/admin/nfg-edit-album-admin.php+31
    Trying to get property 'descr' of non-object
    • > GET request to /wp-admin/admin.php?page=nfg
    • > Notice in wp-content/plugins/no-frills-gallery/admin/nfg-edit-album-admin.php+35
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/no-frills-gallery/no-frills-gallery.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/no-frills-gallery/admin/nfg-edit-album-admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/no-frills-gallery/admin/nfg-slideshow-shortcode-generator-admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/no-frills-gallery/admin/nfg-album-shortcode-generator-admin.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: You should set the name of your plugin on the first line ( === No Frills Gallery=== )
  • Contributors: Plugin contributors not specified
You can look at the official readme.txt

no-frills-gallery/no-frills-gallery.php 92% from 13 tests

"No Frills Gallery" version 1.3.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 174 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin2,717 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
CSS3472702
JavaScript6196112693
PHP4439155682
SVG100640

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/next.png1.32KB1.58KB0.00%
img/prev.png1.33KB1.59KB0.00%
img/questionmark.png1.07KB0.97KB▼ 9.36%
img/close.png0.27KB0.29KB0.00%