78% just-in-case-gallery

Code Review | Just In Case Gallery

WordPress plugin Just In Case Gallery scored78%from 54 tests.

About plugin

  • Plugin page: just-in-case-gallery
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Mar 10, 2013
  • Latest release: Apr 11, 2013
  • Number of updates: 12
  • Update frequency: every 2.7 days
  • Top authors: line5 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,402 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.76ms] Passed 4 tests

Analyzing server-side resources used by Just In Case Gallery
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.34 ▲3.19
Dashboard /wp-admin3.34 ▲0.0453.09 ▲0.31
Posts /wp-admin/edit.php3.39 ▲0.0448.38 ▲0.77
Add New Post /wp-admin/post-new.php5.92 ▲0.0485.78 ▼13.83
Media Library /wp-admin/upload.php3.26 ▲0.0438.99 ▲1.70
Just In Case Gallery /wp-admin/options-general.php?page=test-setting-admin3.2131.83

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Just In Case Gallery
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,995 ▲20914.08 ▼0.326.48 ▲4.3041.87 ▼2.07
Dashboard /wp-admin2,228 ▲254.85 ▼0.06113.50 ▲2.1842.23 ▼1.76
Posts /wp-admin/edit.php2,104 ▲42.12 ▲0.1036.06 ▼1.6537.03 ▲3.25
Add New Post /wp-admin/post-new.php1,548 ▼623.56 ▲0.86630.04 ▼50.6756.87 ▲0.72
Media Library /wp-admin/upload.php1,404 ▲104.31 ▲0.1098.03 ▼9.5341.65 ▼4.64
Just In Case Gallery /wp-admin/options-general.php?page=test-setting-admin7972.0225.0529.66

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

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
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=test-setting-admin
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=test-setting-admin
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/just-in-case-gallery/options.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/just-in-case-gallery/just-in-case-gallery.php:112

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Donate link: Invalid URI found ("")
The official readme.txt is a good inspiration

just-in-case-gallery/just-in-case-gallery.php Passed 13 tests

The primary PHP file in "Just In Case Gallery" version 0.5 is used by WordPress to initiate all plugin functionality
31 characters long description:
Creates a nice lightbox gallery

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
Everything looks great! No dangerous files found in this plugin888 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript160170547
PHP24945218
CSS1149123

PHP code Passed 2 tests

A brief analysis 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.22
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.62
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.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
6 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/arrow-right.png1.37KB0.67KB▼ 50.79%
img/arrow-left.png1.36KB0.68KB▼ 50.36%
img/arrow-left-hover.png5.81KB3.89KB▼ 33.04%
img/icon-close.png0.99KB0.68KB▼ 31.49%
img/icon-close-hover.png2.69KB2.53KB▼ 6.20%