94% wp-add-titles-to-post-thumbnails

Code Review | WP Add Titles to post thumbnails

WordPress plugin WP Add Titles to post thumbnails scored 94% from 54 tests.

About plugin

  • Plugin page: wp-add-titles-to-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.6
  • WordPress version: 5.8.1
  • First release: Aug 26, 2016
  • Latest release: Aug 26, 2016
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: freelancevip (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 820 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.00MB] [CPU: ▼153.94ms] Passed 4 tests

Server-side resources used by WP Add Titles to post thumbnails
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0136.68 ▲2.11
Dashboard /wp-admin3.07 ▲0.0140.91 ▼9.39
Posts /wp-admin/edit.php3.12 ▲0.0149.60 ▼1.57
Add New Post /wp-admin/post-new.php5.42 ▼0.0195.80 ▼598.82
Media Library /wp-admin/upload.php3.01 ▲0.0133.57 ▼5.96

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by WP Add Titles to post thumbnails
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10716.02 ▲0.539.58 ▲1.4348.88 ▲0.05
Dashboard /wp-admin2,967 ▲335.90 ▼0.28151.02 ▲2.32111.44 ▼0.79
Posts /wp-admin/edit.php2,739 ▼02.70 ▲0.0174.70 ▼6.3989.83 ▼6.90
Add New Post /wp-admin/post-new.php1,683 ▼018.77 ▲0.29386.10 ▼16.67119.92 ▲9.18
Media Library /wp-admin/upload.php1,810 ▼05.02 ▲0.00149.88 ▼12.66132.85 ▼9.21

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
The plugin uninstalled completely, with no zombie files or tables

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-add-titles-to-post-thumbnails/wp-add-title-to-post-thumbnails.php:29

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: the_post_thumbnail, title, thumbnail title, post thumbnail title, post thumbnail

wp-add-titles-to-post-thumbnails/wp-add-title-to-post-thumbnails.php 92% from 13 tests

"WP Add Titles to post thumbnails" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-add-titles-to-post-thumbnails.php" instead of "wp-add-title-to-post-thumbnails.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected28 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1135028

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods4100.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.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