78% photo-roll

Code Review | Photo roll

WordPress plugin Photo roll scored 78% from 54 tests.

About plugin

  • Plugin page: photo-roll
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Mar 2, 2020
  • Latest release: Mar 2, 2020
  • Number of updates: 4
  • Update frequency: every 1.0 days
  • Top authors: joe9sig (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 1,579 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.16MB] [CPU: ▼6.05ms] Passed 4 tests

This is a short check of server-side resources used by Photo roll
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1536.82 ▼6.86
Dashboard /wp-admin3.45 ▲0.1546.17 ▼6.15
Posts /wp-admin/edit.php3.57 ▲0.2154.19 ▲6.04
Add New Post /wp-admin/post-new.php6.05 ▲0.1781.53 ▼10.10
Media Library /wp-admin/upload.php3.38 ▲0.1534.99 ▼1.08

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Photo roll
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,930 ▲19514.07 ▼0.324.88 ▲3.1837.80 ▼7.30
Dashboard /wp-admin2,228 ▲434.85 ▼1.05111.91 ▼16.1642.70 ▼9.91
Posts /wp-admin/edit.php2,111 ▲221.98 ▼0.0346.72 ▲10.1637.80 ▲2.97
Add New Post /wp-admin/post-new.php1,542 ▲2218.21 ▼4.97638.59 ▼35.8359.90 ▲5.42
Media Library /wp-admin/upload.php1,407 ▲194.22 ▲0.0498.76 ▼18.1040.28 ▼9.13

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

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
Good news, no errors were detected

SRP 0% from 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
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/photo-roll/public/partials/instantgram-public-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'PRI_Instantgram_Public' not found in wp-content/plugins/photo-roll/admin/partials/instantgram-admin-display.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: insta, widget, feed, importer, gallery...

photo-roll/instantgram.php 85% from 13 tests

The primary PHP file in "Photo roll" version 1.0.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("photo-roll.php" instead of "instantgram.php")

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
No dangerous file extensions were detected566 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP15236698533
CSS14017
SVG10010
JavaScript24546

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity5.20
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods48
▷ Static methods714.58%
▷ Public methods3879.17%
▷ Protected methods00.00%
▷ Private methods1020.83%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected