84% fpw-category-thumbnails

Code Review | FPW Category Thumbnails

WordPress plugin FPW Category Thumbnails scored84%from 54 tests.

About plugin

  • Plugin page: fpw-category-thum...
  • Plugin version: 1.9.4
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.3
  • WordPress version: 6.3.1
  • First release: Oct 15, 2010
  • Latest release: Aug 10, 2023
  • Number of updates: 751
  • Update frequency: every 6.2 days
  • Top authors: frankpw (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

700+ active /44,804 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.10MB] [CPU: ▼6.64ms] Passed 4 tests

Server-side resources used by FPW Category Thumbnails
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.24 ▲1.28
Dashboard /wp-admin3.45 ▲0.1047.16 ▼13.49
Posts /wp-admin/edit.php3.56 ▲0.2051.15 ▲2.36
Add New Post /wp-admin/post-new.php6.03 ▲0.1494.52 ▼15.04
Media Library /wp-admin/upload.php3.37 ▲0.1438.61 ▲0.69
FPW Category Thumbnails /wp-admin/themes.php?page=fpw-category-thumbnails3.4240.04

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 42 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
can_compress_scripts
category_children
fpw_category_thumb_map
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for FPW Category Thumbnails
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7214.51 ▲0.111.72 ▲0.0042.66 ▲1.24
Dashboard /wp-admin2,224 ▲395.86 ▼0.02108.13 ▲4.7842.07 ▼5.03
Posts /wp-admin/edit.php2,107 ▲182.05 ▲0.0439.57 ▼3.0433.82 ▼0.23
Add New Post /wp-admin/post-new.php1,544 ▲1123.11 ▲0.03653.16 ▲24.4453.18 ▼11.66
Media Library /wp-admin/upload.php1,403 ▲154.21 ▼0.0395.94 ▼19.9942.86 ▼4.37
FPW Category Thumbnails /wp-admin/themes.php?page=fpw-category-thumbnails1,3142.0936.6326.08

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-posts
    • category_children
    • widget_recent-comments
    • fpw_category_thumb_map
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 22× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/fpw-category-thumbnails/help/fpthelp.php
    • > /wp-content/plugins/fpw-category-thumbnails/ajax/getimageid.php
    • > /wp-content/plugins/fpw-category-thumbnails/ajax/fptupdate.php
    • > /wp-content/plugins/fpw-category-thumbnails/classes/fpw-category-thumbnails-class.php
    • > /wp-content/plugins/fpw-category-thumbnails/ajax/remove.php
    • > /wp-content/plugins/fpw-category-thumbnails/scripts/enqueuepointerscripts.php
    • > /wp-content/plugins/fpw-category-thumbnails/scripts/fptenqueuepointerscripts.php
    • > /wp-content/plugins/fpw-category-thumbnails/code/table.php
    • > /wp-content/plugins/fpw-category-thumbnails/ajax/restore.php
    • > /wp-content/plugins/fpw-category-thumbnails/help/help.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (FPW Post Thumbnails - Settings - JavaScript off) image not found
You can take inspiration from this readme.txt

fpw-category-thumbnails/fpw-category-thumbnails.php 92% from 13 tests

This is the main PHP file of "FPW Category Thumbnails" version 1.9.4, 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:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

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
There were no executable files found in this plugin3,452 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP223062172,599
JavaScript67964801
CSS19152

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity65.40
▷ Minimum class complexity6.00
▷ Maximum class complexity138.00
Average method complexity5.47
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods72
▷ Static methods22.78%
▷ Public methods6387.50%
▷ Protected methods00.00%
▷ Private methods912.50%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/Thumbs_Up.png57.42KB16.54KB▼ 71.20%