10% piwigopress

Code Review | PiwigoPress

WordPress plugin PiwigoPress scored10%from 54 tests.

About plugin

  • Plugin page: piwigopress
  • Plugin version: 2.32
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8.4-4.9.4
  • WordPress version: 6.3.1
  • First release: Oct 26, 2009
  • Latest release: Feb 10, 2018
  • Number of updates: 45
  • Update frequency: every 67.3 days
  • Top authors: norbusan (62.22%)vpiwigo (40%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active /15,445 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/piwigopress/piwigopress_admin.php+220
    Undefined variable: PWG_Adm

Server metrics [RAM: ▼1.90MB] [CPU: ▼56.61ms] Passed 4 tests

A check of server-side resources used by PiwigoPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.70 ▼4.57
Dashboard /wp-admin2.05 ▼1.267.34 ▼53.72
Posts /wp-admin/edit.php2.05 ▼1.317.09 ▼53.01
Add New Post /wp-admin/post-new.php2.05 ▼3.845.92 ▼87.46
Media Library /wp-admin/upload.php2.05 ▼1.186.71 ▼32.23

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 41 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_piwigopress
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for PiwigoPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,894 ▲14813.99 ▼0.308.24 ▲6.3942.15 ▲1.21
Dashboard /wp-admin2,221 ▲335.01 ▲0.09101.29 ▼16.3638.80 ▼4.79
Posts /wp-admin/edit.php2,103 ▲142.45 ▲0.4038.65 ▼4.2435.18 ▼1.48
Add New Post /wp-admin/post-new.php1,680 ▲16122.96 ▼0.18615.19 ▼9.3734.55 ▼24.48
Media Library /wp-admin/upload.php1,397 ▲64.34 ▲0.15100.59 ▼3.5141.57 ▼3.37

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/piwigopress/piwigopress_admin.php+220
    Undefined variable: PWG_Adm
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_piwigopress
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/piwigopress/PiwigoPress_widget.php

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)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Widget parameters for the demo gallery), #2 (Expected result in your sidebar), #3 (Widget parameters for your gallery (on the same domain)), #4 (Piwigo admin Photo sizes (from a Gallery website)), #5 (PiwigoPress shortcode samples), #6 (PiwigoPress shortcode generator above Post/Page editor usable with both Visual/HTML editor.), #7 (Buttons, Drag and Drop zones for a total intuitive interface.), #8 (Generation and insertion of the shortcodes are done at caret (insert cursor) position.), #9 (Expected result on your page or post of your Wordpress blog.)
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
Please take inspiration from this readme.txt

piwigopress/piwigopress.php 92% from 13 tests

Analyzing the main PHP file in "PiwigoPress" version 2.32
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 149 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin2,711 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PO File54845081,148
PHP895106945
CSS301324
JavaScript41025267
make111127

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity10.50
▷ Minimum class complexity7.00
▷ Maximum class complexity14.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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.14MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/PiwigoPress.png1.49KB1.45KB▼ 3.07%
img/PiwigoPress-widget-bg.png140.44KB41.48KB▼ 70.46%