89% miln-photo-feed

Code Review | Miln Photo Feed

WordPress plugin Miln Photo Feed scored 89% from 54 tests.

About plugin

  • Plugin page: miln-photo-feed
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.1
  • WordPress version: 5.8.1
  • First release: Feb 23, 2013
  • Latest release: Apr 21, 2015
  • Number of updates: 8
  • Update frequency: every 98.6 days
  • Top authors: graham.miln (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,312 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

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

Analyzing server-side resources used by Miln Photo Feed
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1326.70 ▲4.76
Dashboard /wp-admin3.07 ▲0.0145.53 ▲2.13
Posts /wp-admin/edit.php3.13 ▲0.0146.99 ▼6.92
Add New Post /wp-admin/post-new.php5.43 ▼0.0186.34 ▼579.33
Media Library /wp-admin/upload.php3.02 ▲0.0132.53 ▼0.61

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Miln Photo Feed
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲6616.32 ▲0.629.73 ▲0.6350.79 ▲6.59
Dashboard /wp-admin2,970 ▲395.88 ▼0.05134.85 ▼2.79115.44 ▲5.29
Posts /wp-admin/edit.php2,739 ▼02.72 ▼0.0064.71 ▲2.1384.97 ▼5.88
Add New Post /wp-admin/post-new.php1,872 ▼019.10 ▼0.20377.09 ▼1.10111.59 ▼5.18
Media Library /wp-admin/upload.php1,810 ▲34.99 ▼0.03142.72 ▲1.66122.84 ▲7.74

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/miln-photo-feed/miln-photo-feed.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function feed_content_type() in wp-content/plugins/miln-photo-feed/miln-photo-feed-template.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

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
10 plugin tags: photo feed, photo, feeds, rss, stream...

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

"Miln Photo Feed" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
41 characters long description:
Provides an RSS photo feed from WordPress

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
Success! There were no dangerous files found in this plugin75 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2173375

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.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
No PNG files were detected