79% photo-feed

Code Review | Photo Feed

WordPress plugin Photo Feed scored79%from 54 tests.

About plugin

  • Plugin page: photo-feed
  • Plugin version: 2.2.1
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.1
  • WordPress version: 6.3.1
  • First release: May 27, 2020
  • Latest release: Jan 13, 2023
  • Number of updates: 24
  • Update frequency: every 40.3 days
  • Top authors: sktei007 (91.67%)rajnisha (12.5%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /8,747 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼2.80ms] Passed 4 tests

An overview of server-side resources used by Photo Feed
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1337.84 ▼2.88
Dashboard /wp-admin3.44 ▲0.1348.74 ▼4.64
Posts /wp-admin/edit.php3.55 ▲0.1949.78 ▲1.41
Add New Post /wp-admin/post-new.php6.02 ▲0.1392.27 ▼5.10
Media Library /wp-admin/upload.php3.36 ▲0.1336.55 ▲2.35
Photo Feed /wp-admin/options-general.php?page=photo-feed3.3433.67

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 28 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_photofeed_widget

Browser metrics Passed 4 tests

Photo Feed: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.24 ▼0.481.63 ▼0.0737.88 ▼6.07
Dashboard /wp-admin2,199 ▲215.61 ▼0.1580.03 ▼17.1538.94 ▼2.68
Posts /wp-admin/edit.php2,101 ▲11.99 ▲0.0038.33 ▲3.4436.58 ▼0.50
Add New Post /wp-admin/post-new.php1,547 ▲1423.16 ▲0.11599.63 ▼91.1153.57 ▼8.44
Media Library /wp-admin/upload.php1,401 ▼24.22 ▲0.0895.72 ▼3.7340.95 ▼4.10
Photo Feed /wp-admin/options-general.php?page=photo-feed8392.1527.8330.93

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_photofeed_widget
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/photo-feed/photo-feed.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/photo-feed/app/views/new-account.php:9
    • > PHP Warning
      Use of undefined constant PHOTOFEED_URL - assumed 'PHOTOFEED_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/photo-feed/app/views/new-account.php on line 9

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

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: instagram gallery, instagram widget, instagram photos, instagram plugin, wordpress instagram plugin...

photo-feed/photo-feed.php Passed 13 tests

This is the main PHP file of "Photo Feed" version 2.2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
73 characters long description:
A simple and lightweight plugin to display Instagram Feed within website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin1,978 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP151801501,517
CSS41819444
SVG14016
JavaScript11121

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity13.00
▷ Minimum class complexity7.00
▷ Maximum class complexity23.00
Average method complexity3.19
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1694.12%
▷ Protected methods15.88%
▷ Private methods00.00%
Functions20
▷ Named functions1575.00%
▷ Anonymous functions525.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/media/instagram-icon.png10.83KB4.16KB▼ 61.60%