84% category-featured-images

Code Review | Category Featured Images

WordPress plugin Category Featured Images scored84%from 54 tests.

About plugin

  • Plugin page: category-featured...
  • Plugin version: 1.1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.1
  • WordPress version: 6.3.1
  • First release: Apr 25, 2014
  • Latest release: Jan 29, 2015
  • Number of updates: 22
  • Update frequency: every 12.7 days
  • Top authors: blocknot.es (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

1,000+ active /19,549 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Category Featured Images
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0439.55 ▲0.10
Dashboard /wp-admin3.36 ▲0.0552.58 ▲0.12
Posts /wp-admin/edit.php3.48 ▲0.1252.12 ▼21.29
Add New Post /wp-admin/post-new.php5.94 ▲0.0578.97 ▼21.13
Media Library /wp-admin/upload.php3.26 ▲0.0337.64 ▲0.81

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: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Category Featured Images
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,932 ▲17114.62 ▼0.011.70 ▲0.1142.13 ▲2.47
Dashboard /wp-admin2,338 ▲1616.11 ▲0.45102.75 ▲15.5538.44 ▼5.46
Posts /wp-admin/edit.php2,266 ▲1663.33 ▲1.3651.86 ▲10.5233.54 ▼3.74
Add New Post /wp-admin/post-new.php1,530 ▲223.72 ▲0.67652.99 ▼44.3935.89 ▼22.63
Media Library /wp-admin/upload.php1,401 ▲14.17 ▼0.0484.45 ▼9.6346.55 ▲2.76

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/category-featured-images/category-featured-images.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: post, images, categories, posts

category-featured-images/category-featured-images.php 92% from 13 tests

This is the main PHP file of "Category Featured Images" version 1.1.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 144 characters long)

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
Good job! No executable or dangerous file extensions detected246 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP11617206
JavaScript171026
CSS13614

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.65
Average class complexity53.00
▷ Minimum class complexity53.00
▷ Maximum class complexity53.00
Average method complexity6.78
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods333.33%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.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
There were not PNG files found in your plugin