94% photoblog-image-fixer

Code Review | PhotoBlog Image Fixer

WordPress plugin PhotoBlog Image Fixer scored 94% from 54 tests.

About plugin

  • Plugin page: photoblog-image-f...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: May 3, 2010
  • Latest release: Oct 18, 2014
  • Number of updates: 10
  • Update frequency: every 162.9 days
  • Top authors: MartyThornley (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 2,221 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼145.59ms] Passed 4 tests

Server-side resources used by PhotoBlog Image Fixer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1232.80 ▲5.54
Dashboard /wp-admin3.06 ▲0.0146.34 ▲1.08
Posts /wp-admin/edit.php3.12 ▲0.0143.43 ▼1.48
Add New Post /wp-admin/post-new.php5.42 ▼0.0187.25 ▼580.79
Media Library /wp-admin/upload.php3.01 ▲0.0131.45 ▼1.16

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for PhotoBlog Image Fixer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,814 ▲21816.21 ▲0.5513.83 ▲4.1841.06 ▼4.52
Dashboard /wp-admin2,973 ▲425.92 ▼0.11145.41 ▼12.46109.02 ▼3.66
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0180.15 ▲12.2181.14 ▼5.37
Add New Post /wp-admin/post-new.php1,500 ▼8118.57 ▲4.11400.92 ▲1.19118.41 ▲7.04
Media Library /wp-admin/upload.php1,807 ▼05.07 ▲0.06153.96 ▼1.00110.27 ▲1.12

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 75% from 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 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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/photoblog-image-fixer/photoblog_image_fixer.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === photoblog-image-fixer === )
You can take inspiration from this readme.txt

photoblog-image-fixer/photoblog_image_fixer.php 92% from 13 tests

The main file in "PhotoBlog Image Fixer" v. 1.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("photoblog-image-fixer.php" instead of "photoblog_image_fixer.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin28 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1152328

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.00
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

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin