84% format-media-titles

Code Review | Format Media Titles

WordPress plugin Format Media Titles scored84%from 54 tests.

About plugin

  • Plugin page: format-media-titles
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4.2
  • WordPress version: 6.3.1
  • First release: Oct 25, 2011
  • Latest release: Jul 14, 2020
  • Number of updates: 44
  • Update frequency: every 72.4 days
  • Top authors: dgwyer (100%)

Code review

54 tests

User reviews

18 reviews

Install metrics

7,000+ active /51,905 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.39ms] Passed 4 tests

Server-side resources used by Format Media Titles
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0439.78 ▼7.70
Dashboard /wp-admin3.35 ▲0.0549.18 ▼0.82
Posts /wp-admin/edit.php3.41 ▲0.0555.00 ▲0.95
Add New Post /wp-admin/post-new.php5.93 ▲0.0592.98 ▼6.00
Media Library /wp-admin/upload.php3.28 ▲0.0538.81 ▲1.56
Format Media Titles /wp-admin/options-general.php?page=format-media-titles/format-media-titles.php3.2433.48

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

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

Browser metrics Passed 4 tests

Format Media Titles: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3314.48 ▲0.081.81 ▼0.4043.12 ▼1.77
Dashboard /wp-admin2,210 ▲194.85 ▼1.04106.77 ▲1.0041.43 ▼0.59
Posts /wp-admin/edit.php2,096 ▲72.01 ▲0.0135.93 ▼4.6435.43 ▼0.72
Add New Post /wp-admin/post-new.php1,536 ▼623.33 ▲4.91691.29 ▲21.5954.31 ▼13.71
Media Library /wp-admin/upload.php1,389 ▲74.16 ▼0.06101.26 ▼0.9047.38 ▲3.37
Format Media Titles /wp-admin/options-general.php?page=format-media-titles/format-media-titles.php1,0342.0727.8853.74

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/format-media-titles/format-media-titles.php:31

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 on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: media, image, tag, alt, format...

format-media-titles/format-media-titles.php Passed 13 tests

Analyzing the main PHP file in "Format Media Titles" version 1.0.0
129 characters long description:
Automatically formats the title for new media uploads. No need to manually edit the title anymore every time you upload an image!

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 plugin215 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15438215

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
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%
Functions8
▷ Named functions8100.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
5 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/info.png0.52KB0.46KB▼ 10.55%
images/wpgo_plugins_logo.png7.61KB3.85KB▼ 49.41%
images/yt.png1.38KB1.10KB▼ 20.55%
images/facebook.png1.89KB1.10KB▼ 41.73%
images/twitter.png2.09KB1.30KB▼ 38.02%