84% force-featured-image

Code Review | Force Featured Image

WordPress plugin Force Featured Image scored84%from 54 tests.

About plugin

  • Plugin page: force-featured-image
  • Plugin version: 0.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.7.1
  • WordPress version: 6.3.1
  • First release: Nov 3, 2013
  • Latest release: Feb 25, 2015
  • Number of updates: 6
  • Update frequency: every 113.3 days
  • Top authors: jonathanbardo (83.33%)westonruter (33.33%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /3,320 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Force Featured Image
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.31 ▲1.51
Dashboard /wp-admin3.31 ▲0.0143.26 ▼9.03
Posts /wp-admin/edit.php3.36 ▲0.0046.09 ▲2.87
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.18 ▼1.44
Media Library /wp-admin/upload.php3.23 ▲0.0033.08 ▲1.17

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Force Featured Image
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.11 ▼1.161.77 ▲0.0538.07 ▼1.02
Dashboard /wp-admin2,206 ▲154.84 ▼1.0699.45 ▼2.8338.88 ▲0.25
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0737.95 ▲2.5034.86 ▲0.78
Add New Post /wp-admin/post-new.php1,533 ▼223.28 ▼0.02648.63 ▼13.2156.89 ▼1.12
Media Library /wp-admin/upload.php1,388 ▲64.14 ▼0.0397.62 ▲2.5740.54 ▲0.76

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/force-featured-image/force-featured-image.php:58

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 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
5 plugin tags: featured, tinymce, admin, image, featured-image

force-featured-image/force-featured-image.php 92% from 13 tests

"Force Featured Image" version 0.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
Everything looks great! No dangerous files found in this plugin628 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP363155301
Bourne Again Shell24318161
Markdown331076
Bourne Shell110642
YAML15028
XML22020

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity22.00
▷ Minimum class complexity21.00
▷ Maximum class complexity23.00
Average method complexity3.64
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods975.00%
▷ Protected methods00.00%
▷ Private methods325.00%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected