84% jonathansblog-featured-image-setter

Code Review | Born Creative Featured Image Setter

WordPress plugin Born Creative Featured Image Setter scored84%from 54 tests.

About plugin

  • Plugin page: jonathansblog-fea...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 13, 2020
  • Latest release: Oct 28, 2023
  • Number of updates: 11
  • Update frequency: every 112.0 days
  • Top authors: jonathansblog (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /891 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.09ms] Passed 4 tests

Server-side resources used by Born Creative Featured Image Setter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0131.41 ▼4.28
Dashboard /wp-admin3.32 ▲0.0147.17 ▲2.48
Posts /wp-admin/edit.php3.37 ▲0.0143.17 ▼1.41
Add New Post /wp-admin/post-new.php5.90 ▲0.0179.93 ▼3.67
Media Library /wp-admin/upload.php3.24 ▲0.0134.82 ▼3.00

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Born Creative Featured Image Setter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.72 ▲0.131.71 ▼0.1237.60 ▼3.04
Dashboard /wp-admin2,192 ▲155.52 ▼0.0881.29 ▼3.2536.61 ▼6.85
Posts /wp-admin/edit.php2,100 ▲31.98 ▼0.0035.31 ▼2.3438.45 ▲2.01
Add New Post /wp-admin/post-new.php1,526 ▼223.24 ▲0.25676.76 ▼11.8459.80 ▲6.51
Media Library /wp-admin/upload.php1,403 ▲94.25 ▼0.01102.45 ▼3.2446.45 ▲4.20

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/jonathansblog-featured-image-setter/views/borncreative-featured-image-setter-admin-view.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jonathansblog-featured-image-setter/includes/borncreative-featured-image-setter-admin.php:3

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
1 plugin tags: featured image

jonathansblog-featured-image-setter/borncreative-featured-image-setter.php 92% from 13 tests

"Born Creative Featured Image Setter" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("jonathansblog-featured-image-setter.php" instead of "borncreative-featured-image-setter.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
Good job! No executable or dangerous file extensions detected189 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP42540160
Markdown111029

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin