10% wp-500px-jsgallery

Code Review | WP 500px jsGallery

WordPress plugin WP 500px jsGallery scored10%from 54 tests.

About plugin

  • Plugin page: wp-500px-jsgallery
  • Plugin version: 2.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-4.7
  • WordPress version: 6.3.1
  • First release: Feb 27, 2014
  • Latest release: Feb 1, 2017
  • Number of updates: 34
  • Update frequency: every 31.5 days
  • Top authors: micz (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /6,252 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure had errors
    • > Error in wp-content/plugins/wp-500px-jsgallery/wp-500px-jsgallery.class.php+108
    Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/wp-500px-jsgallery/wp-500px-jsgallery.class.php:108
    Stack trace:
    #0 wp-content/plugins/wp-500px-jsgallery/wp-500px-jsgallery.php(48): include_once()
    #1 wp-admin/includes/plugin.php(2318): include_once('/var/www/wordpr...')
    #2 wp-admin/includes/plugin.php(663): plugin_sandbox_scrape()

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.87ms] Passed 4 tests

A check of server-side resources used by WP 500px jsGallery
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.01 ▲0.31
Dashboard /wp-admin3.31 ▲0.0063.70 ▲8.64
Posts /wp-admin/edit.php3.36 ▲0.0050.51 ▼1.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.50 ▼16.47
Media Library /wp-admin/upload.php3.23 ▲0.0034.42 ▼1.99

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WP 500px jsGallery
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.33 ▲0.151.70 ▼0.3043.07 ▼1.10
Dashboard /wp-admin2,198 ▲185.62 ▼0.0394.94 ▼4.5641.89 ▼2.56
Posts /wp-admin/edit.php2,103 ▲61.98 ▼0.0034.16 ▼1.6334.33 ▼4.04
Add New Post /wp-admin/post-new.php1,526 ▼223.04 ▲0.11661.38 ▼17.5157.51 ▼0.77
Media Library /wp-admin/upload.php1,403 ▲34.20 ▼0.0394.70 ▼7.8643.74 ▲1.15

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
The following issues need your attention
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-500px-jsgallery/wp-500px-jsgallery.class.php
    • > /wp-content/plugins/wp-500px-jsgallery/wp-500px-jsgallery.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/wp-500px-jsgallery/wp-500px-jsgallery.class.php:108
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/wp-500px-jsgallery/wp-500px-jsgallery.class.php:108

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: photos, 500px, photo, jquery, javascript...

wp-500px-jsgallery/wp-500px-jsgallery.php 92% from 13 tests

The main PHP script in "WP 500px jsGallery" version 2.1.2 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 313 characters long)

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
Everything looks great! No dangerous files found in this plugin1,650 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript5225258899
PHP34381332
CSS21330311
PO File15153108

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin