64% picu

Code Review | picu - WordPress Photo Proofing Gallery

WordPress plugin picu - WordPress Photo Proofing Gallery scored64%from 54 tests.

About plugin

  • Plugin page: picu
  • Plugin version: 2.0.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: Sep 1, 2015
  • Latest release: Nov 29, 2023
  • Number of updates: 140
  • Update frequency: every 21.6 days
  • Top authors: florianziegler (99.29%)pandulu (1.43%)

Code review

54 tests

User reviews

49 reviews

Install metrics

2,000+ active /67,858 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲1.29MB] [CPU: ▲4.38ms] 75% from 4 tests

Server-side resources used by picu - WordPress Photo Proofing Gallery
It is recommended to improve the following
  • CPU: Total CPU usage should be kept under 500.00ms (currently 689.55ms on /wp-admin/admin.php?page=picu-tools-debug)
PageMemory (MB)CPU Time (ms)
Home /4.74 ▲1.2848.28 ▲7.15
Dashboard /wp-admin4.60 ▲1.3052.82 ▲0.41
Posts /wp-admin/edit.php4.66 ▲1.3053.49 ▲4.30
Add New Post /wp-admin/post-new.php7.19 ▲1.30100.79 ▲5.65
Media Library /wp-admin/upload.php4.53 ▲1.3049.84 ▲15.32
Design/Appearance /wp-admin/admin.php?page=picu-design-appearance4.5447.21
Settings /wp-admin/admin.php?page=picu-settings4.3232.51
General /wp-admin/admin.php?page=picu-general4.5346.80
Tools/Debug /wp-admin/admin.php?page=picu-tools-debug5.26689.55
picu Pro /wp-admin/admin.php?page=picu-add-ons4.5345.70
Email /wp-admin/admin.php?page=picu-email4.5347.66
Telemetry /wp-admin/admin.php?page=picu-telemetry4.5346.72
picu Welcome Screen /wp-admin/index.php?page=picu-welcome-screen4.5346.57
All Collections /wp-admin/edit.php?post_type=picu_collection4.5752.55
Security /wp-admin/admin.php?page=picu-security4.5349.23

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 221 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
picu_settings_version
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by picu - WordPress Photo Proofing Gallery
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲9814.72 ▲0.321.61 ▲0.0438.51 ▼4.49
Dashboard /wp-admin2,247 ▲695.62 ▲0.0084.72 ▼36.0336.47 ▼9.19
Posts /wp-admin/edit.php2,152 ▲702.03 ▲0.0538.52 ▲0.2933.26 ▼2.74
Add New Post /wp-admin/post-new.php1,557 ▲3123.31 ▼0.23637.28 ▲14.9065.60 ▲11.64
Media Library /wp-admin/upload.php1,447 ▲534.25 ▲0.0299.55 ▲1.0740.70 ▼0.86
Design/Appearance /wp-admin/admin.php?page=picu-design-appearance1,2594.1885.0682.50
Settings /wp-admin/admin.php?page=picu-settings1,2674.2387.9188.46
General /wp-admin/admin.php?page=picu-general1,2644.1772.7480.40
Tools/Debug /wp-admin/admin.php?page=picu-tools-debug1,2874.1974.6480.39
picu Pro /wp-admin/admin.php?page=picu-add-ons1,4974.1274.3696.53
Email /wp-admin/admin.php?page=picu-email1,3414.1472.1780.21
Telemetry /wp-admin/admin.php?page=picu-telemetry1,2764.1878.3878.99
picu Welcome Screen /wp-admin/index.php?page=picu-welcome-screen1,2274.1672.7276.56
All Collections /wp-admin/edit.php?post_type=picu_collection1,1821.9634.7037.07
Security /wp-admin/admin.php?page=picu-security1,2404.1477.1989.24

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Compile error in wp-content/plugins/picu/backend/includes/picu-media.php+15
    Cannot redeclare picu_delete_attached_media() (previously declared in wp-content/plugins/picu/backend/includes/picu-media.php:15)
  • This plugin has failed uninstalling correctly, leaving 221 files (1.63MB) in the plugin directory
    • (new file) backend/images/add-ons/add-on-download-icon.png
    • (new file) backend/css/picu-admin.css
    • (new file) backend/images/add-ons/add-on-mark-comment-icon.png
    • (new file) backend/images/add-ons/add-on-theft-protection-icon.png
    • (new file) backend/images/add-ons/add-on-mutli-client-support-icon.png
    • (new file) backend/images/add-ons/add-on-selection-options-icon.png
    • (new file) backend/images/add-ons/add-on-brand-customize-icon.png
    • (new file) backend/images/add-ons/add-on-delivery-icon.png
    • (new file) backend/css/picu-admin.css.map
    • (new file) backend/images/add-ons/add-on-import-icon.png
    • ...
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_theysaidso_widget
    • recovery_mode_email_last_sent
    • db_upgraded
    • can_compress_scripts
    • picu_settings_version
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% 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 fix the following items
  • 76× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\RuleSet\\RuleSet' not found in wp-content/plugins/picu/vendor/sabberworm/php-css-parser/src/RuleSet/DeclarationBlock.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'Stringable' not found in wp-content/plugins/picu/vendor/symfony/polyfill-php80/PhpToken.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\ode\\AbstractNode' not found in wp-content/plugins/picu/vendor/symfony/css-selector/Node/CombinedSelectorNode.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' not found in wp-content/plugins/picu/vendor/symfony/css-selector/Parser/Handler/NumberHandler.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/picu/frontend/js/templates/picu-collection-info.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\Parsing\\SourceException' not found in wp-content/plugins/picu/vendor/sabberworm/php-css-parser/src/Parsing/UnexpectedTokenException.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\Value\\ValueList' not found in wp-content/plugins/picu/vendor/sabberworm/php-css-parser/src/Value/RuleValueList.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\ode\\AbstractNode' not found in wp-content/plugins/picu/vendor/symfony/css-selector/Node/ClassNode.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\CSSList\\CSSBlockList' not found in wp-content/plugins/picu/vendor/sabberworm/php-css-parser/src/CSSList/AtRuleBlockList.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\XPath\\TranslatorInterface' not found in wp-content/plugins/picu/vendor/symfony/css-selector/XPath/Translator.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
You can take inspiration from this readme.txt

picu/picu.php Passed 13 tests

Analyzing the main PHP file in "picu - WordPress Photo Proofing Gallery" version 2.0.3
61 characters long description:
Send a collection of photographs to your client for approval.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected14,886 lines of code in 182 files:
LanguageFilesBlank linesComment linesLines of code
PHP1483,3447,20413,722
JavaScript18257192847
JSON100298
SVG100010
XML1005
CSS4144

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity10.04
▷ Minimum class complexity1.00
▷ Maximum class complexity112.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces25
Interfaces10
Traits0
Classes99
▷ Abstract classes99.09%
▷ Concrete classes9090.91%
▷ Final classes22.22%
Methods712
▷ Static methods659.13%
▷ Public methods60885.39%
▷ Protected methods70.98%
▷ Private methods9713.62%
Functions223
▷ Named functions19888.79%
▷ Anonymous functions2511.21%
Constants57
▷ Global constants1119.30%
▷ Class constants4680.70%
▷ Public constants3371.74%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
22 PNG files occupy 0.14MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
backend/images/list.png0.49KB0.19KB▼ 61.90%
backend/images/dark-theme.png0.37KB0.37KB0.00%
backend/images/image-size-large.png1.29KB1.03KB▼ 20.05%
backend/images/add-ons/add-on-theft-protection-icon.png26.74KB16.72KB▼ 37.48%
backend/images/add-ons/add-on-delivery-icon.png6.24KB3.82KB▼ 38.68%