90% embed-piwigo

Code Review | Embed Piwigo

WordPress plugin Embed Piwigo scored90%from 54 tests.

About plugin

  • Plugin page: embed-piwigo
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9
  • WordPress version: 6.3.1
  • First release: Aug 15, 2018
  • Latest release: Aug 27, 2018
  • Number of updates: 9
  • Update frequency: every 1.4 days
  • Top authors: samwilson (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /1,911 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.70ms] Passed 4 tests

An overview of server-side resources used by Embed Piwigo
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.04 ▼7.73
Dashboard /wp-admin3.33 ▼0.0249.81 ▼17.05
Posts /wp-admin/edit.php3.38 ▲0.0252.32 ▼0.70
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.91 ▼9.33
Media Library /wp-admin/upload.php3.25 ▲0.0248.35 ▲9.97

Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Please fix the following
  • The plugin illegally modified 1 file (4.00KB) outside of "wp-content/plugins/embed-piwigo/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Embed Piwigo
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.20 ▼1.351.59 ▼0.1040.93 ▲0.11
Dashboard /wp-admin2,221 ▲185.83 ▲0.93103.99 ▲1.3138.75 ▼0.38
Posts /wp-admin/edit.php2,097 ▼62.04 ▲0.0340.12 ▼0.9138.91 ▲1.20
Add New Post /wp-admin/post-new.php1,540 ▲823.28 ▲0.27671.21 ▲53.9753.50 ▼3.74
Media Library /wp-admin/upload.php1,400 ▼04.23 ▲0.03100.34 ▼0.3044.29 ▲0.71

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

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 Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: piwigo, embed, photos, embeds

embed-piwigo/embed-piwigo.php Passed 13 tests

The main file in "Embed Piwigo" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
49 characters long description:
Embed photos from a whitelist of Piwigo websites.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected129 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP154486
Markdown123043

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
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 functions240.00%
▷ Anonymous functions360.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin