10% wp-art-gallery

Code Review | WP Art Gallery

WordPress plugin WP Art Gallery scored10%from 54 tests.

About plugin

  • Plugin page: wp-art-gallery
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-4.7
  • WordPress version: 6.3.1
  • First release: Jan 22, 2017
  • Latest release: Jan 23, 2017
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: micz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /859 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Error in wp-content/plugins/wp-art-gallery/wp-art-gallery.class.php+99
    Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/wp-art-gallery/wp-art-gallery.class.php:99
    Stack trace:
    #0 wp-content/plugins/wp-art-gallery/wp-art-gallery.php(49): 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: ▼6.05ms] Passed 4 tests

Analyzing server-side resources used by WP Art Gallery
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0033.13 ▼5.19
Dashboard /wp-admin3.31 ▲0.0043.64 ▼3.28
Posts /wp-admin/edit.php3.36 ▲0.0042.42 ▼2.29
Add New Post /wp-admin/post-new.php5.89 ▲0.0077.62 ▼13.43
Media Library /wp-admin/upload.php3.23 ▲0.0032.61 ▲1.11

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Art Gallery
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.34 ▼0.021.55 ▼0.5038.97 ▼1.95
Dashboard /wp-admin2,198 ▲205.56 ▼0.0481.13 ▼16.9436.16 ▼6.08
Posts /wp-admin/edit.php2,097 ▼31.97 ▲0.0134.46 ▼0.9629.68 ▼7.56
Add New Post /wp-admin/post-new.php1,532 ▼523.08 ▲5.00680.76 ▲72.8351.77 ▼14.55
Media Library /wp-admin/upload.php1,391 ▼124.19 ▲0.0196.26 ▲3.7240.24 ▼0.03

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-art-gallery/wp-art-gallery.php
    • > /wp-content/plugins/wp-art-gallery/wp-art-gallery.class.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-art-gallery/wp-art-gallery.class.php:99
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/wp-art-gallery/wp-art-gallery.class.php:99

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: immersive, art, jquery, photo, javascript...

wp-art-gallery/wp-art-gallery.php 92% from 13 tests

"WP Art Gallery" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Domain Path: The domain path is invalid: folder "/lang" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,371 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3182125756
CSS2303319
PHP46585295
SVG1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/icons.png0.71KB0.43KB▼ 39.64%
img/hide.png0.47KB0.45KB▼ 4.97%