84% img-title-restore

Code Review | IMG Title Restore

WordPress plugin IMG Title Restore scored84%from 54 tests.

About plugin

  • Plugin page: img-title-restore
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.3
  • WordPress version: 6.3.1
  • First release: Nov 26, 2019
  • Latest release: Nov 26, 2019
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: gashacon (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active /5,914 total downloads

Benchmarks

Plugin footprint 83% 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: ▼3.50ms] Passed 4 tests

This is a short check of server-side resources used by IMG Title Restore
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0144.68 ▲7.15
Dashboard /wp-admin3.31 ▲0.0143.49 ▼1.14
Posts /wp-admin/edit.php3.36 ▲0.0146.26 ▼2.65
Add New Post /wp-admin/post-new.php5.89 ▲0.0183.89 ▼11.97
Media Library /wp-admin/upload.php3.23 ▲0.0135.48 ▲1.76

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for IMG Title Restore
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.25 ▼1.011.59 ▼0.1640.39 ▼1.37
Dashboard /wp-admin2,209 ▲215.91 ▲1.0195.27 ▼22.7641.57 ▼4.10
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0139.15 ▲0.1633.74 ▲2.33
Add New Post /wp-admin/post-new.php1,514 ▼1717.66 ▼5.55610.93 ▼41.0061.74 ▲10.55
Media Library /wp-admin/upload.php1,385 ▲34.42 ▲0.1298.59 ▲2.5741.83 ▼1.23

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% 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)
Even though no errors were found, 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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/img-title-restore/img-title-restore.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: image, title

img-title-restore/img-title-restore.php Passed 13 tests

The principal PHP file in "IMG Title Restore" v. 1.5 is loaded by WordPress automatically on each request
78 characters long description:
Reverses WP 3.5's behaviour of stripping title from images inserted into posts

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected18 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14718

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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