10% zielke-design-project-gallery

Code Review | Zielke Design Project Gallery

WordPress plugin Zielke Design Project Gallery scored10%from 54 tests.

About plugin

  • Plugin page: zielke-design-pro...
  • Plugin version: 2.5.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 6.3.1
  • First release: Dec 30, 2017
  • Latest release: Aug 25, 2020
  • Number of updates: 55
  • Update frequency: every 18.1 days
  • Top authors: tzielke (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,939 total downloads

Benchmarks

Plugin footprint 23% 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
  • This plugin did not install gracefully
    • > Parse error in wp-content/plugins/zielke-design-project-gallery/shortcodes/albums.php+119
    syntax error, unexpected '}'

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

An overview of server-side resources used by Zielke Design Project Gallery
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.79 ▼5.51
Dashboard /wp-admin3.31 ▲0.0049.60 ▼2.94
Posts /wp-admin/edit.php3.36 ▲0.0050.22 ▲1.39
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.50 ▼7.07
Media Library /wp-admin/upload.php3.23 ▲0.0039.76 ▲1.02

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Zielke Design Project Gallery
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.21 ▼1.101.60 ▼0.8138.90 ▼11.97
Dashboard /wp-admin2,224 ▲185.86 ▼0.05108.33 ▲6.1441.77 ▼0.47
Posts /wp-admin/edit.php2,097 ▼62.00 ▲0.0239.58 ▼5.6537.53 ▼2.88
Add New Post /wp-admin/post-new.php1,550 ▲2423.38 ▼0.22672.25 ▼56.8663.46 ▲3.77
Media Library /wp-admin/upload.php1,400 ▲64.24 ▲0.0394.82 ▼10.6448.46 ▲0.86

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Parse error in wp-content/plugins/zielke-design-project-gallery/shortcodes/albums.php+119
    syntax error, unexpected '}'
  • The plugin did not uninstall correctly, leaving 53 files (6.61MB) in the plugin directory
    • (new file) ajax/ajax-functions/lightbox.php
    • (new file) admin/zpg_edit_gallery_functions.php
    • (new file) admin/views/zpg_link.php
    • (new file) ajax/zpg-frontend-ajax.js
    • (new file) admin/views/zpg_images.php
    • (new file) admin/views/zpg_order.php
    • (new file) ajax/ajax-functions/error_log
    • (new file) admin/views/zpg_client.php
    • (new file) admin/pages/settings.php
    • (new file) admin/pages/main.php
    • ...
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • recovery_mode_email_last_sent
    • widget_recent-comments
    • can_compress_scripts
    • 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
Everything seems fine, however 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
The following issues need your attention
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/zielke-design-project-gallery/ajax/ajax-functions/lightbox.php
    • > /wp-content/plugins/zielke-design-project-gallery/admin/pages/main.php
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/zielke-design-project-gallery/admin/views/zpg_link.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/zielke-design-project-gallery/admin/views/zpg_client.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/zielke-design-project-gallery/admin/zpg_edit_gallery_functions.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/zielke-design-project-gallery/admin/views/zpg_order.php:2
    • > PHP Parse error
      syntax error, unexpected '}' in wp-content/plugins/zielke-design-project-gallery/shortcodes/albums.php on line 119
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/zielke-design-project-gallery/admin/views/zpg_images.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/zielke-design-project-gallery/templates/single.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/zielke-design-project-gallery/admin/pages/settings.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
  • Screenshots: Add a description for screenshot #4 in zielke-design-project-gallery/assets to your readme.txt
You can look at the official readme.txt

zielke-design-project-gallery/index.php 85% from 13 tests

The principal PHP file in "Zielke Design Project Gallery" v. 2.5.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("zielke-design-project-gallery.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected5,602 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript109311922,507
CSS786951,438
PHP11106156775
HTML3640299
Sass2275262
LESS1115152
JSON300117
Markdown122030
SVG21014
Ruby1208

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 6.24MB with 2.64MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png3,198.35KB1,229.86KB▼ 61.55%
screenshot-1.png2,105.51KB2,179.78KB0.00%
screenshot-3.png1,081.67KB373.14KB▼ 65.50%