84% rename-featured-image

Code Review | Rename Featured Image

WordPress plugin Rename Featured Image scored84%from 54 tests.

About plugin

  • Plugin page: rename-featured-i...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.2
  • WordPress version: 6.3.1
  • First release: Jul 5, 2015
  • Latest release: Jul 5, 2015
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: hrishiv90 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /1,792 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

An overview of server-side resources used by Rename Featured Image
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.18 ▼1.53
Dashboard /wp-admin3.32 ▼0.0246.95 ▼12.09
Posts /wp-admin/edit.php3.37 ▲0.0243.93 ▼2.88
Add New Post /wp-admin/post-new.php5.90 ▲0.0179.74 ▼5.73
Media Library /wp-admin/upload.php3.24 ▲0.0135.80 ▲1.74
wpRFP Options /wp-admin/options-general.php?page=wpRFP-options3.2131.16

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Rename Featured Image
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7214.26 ▼0.371.82 ▲0.2838.71 ▲2.31
Dashboard /wp-admin2,196 ▲185.52 ▼0.1483.54 ▼16.2241.86 ▼1.34
Posts /wp-admin/edit.php2,104 ▲41.94 ▼0.0835.45 ▲1.2431.98 ▼1.48
Add New Post /wp-admin/post-new.php1,531 ▼423.12 ▲4.52666.36 ▲30.6954.12 ▼26.91
Media Library /wp-admin/upload.php1,404 ▲74.13 ▼0.0299.98 ▲4.8243.01 ▼3.24
wpRFP Options /wp-admin/options-general.php?page=wpRFP-options9242.0223.3027.02

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/rename-featured-image/index.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/rename-featured-image/admin/wpRFP-options.php:256

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 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
5 plugin tags: rename thumbnail, rename image, featured image rename, rename post attachment, rename post thumbnail

rename-featured-image/index.php 85% from 13 tests

The main file in "Rename Featured Image" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 215 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("rename-featured-image.php" instead of "index.php")

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

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity13.50
▷ Minimum class complexity2.00
▷ Maximum class complexity25.00
Average method complexity3.08
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png21.50KB8.79KB▼ 59.11%