78% tidyhive-featured-posts

Code Review | Tidyhive Featured Posts

WordPress plugin Tidyhive Featured Posts scored 78% from 54 tests.

About plugin

  • Plugin page: tidyhive-featured...
  • Plugin version: 1.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 6.3.1
  • First release: Feb 6, 2017
  • Latest release: Mar 11, 2017
  • Number of updates: 15
  • Update frequency: every 2.1 days
  • Top authors: orahmax2 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 3,086 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼8.09ms] Passed 4 tests

A check of server-side resources used by Tidyhive Featured Posts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0942.43 ▼8.19
Dashboard /wp-admin3.39 ▲0.0846.22 ▼9.51
Posts /wp-admin/edit.php3.50 ▲0.1450.09 ▲3.29
Add New Post /wp-admin/post-new.php5.99 ▲0.1086.75 ▼16.00
Media Library /wp-admin/upload.php3.31 ▲0.0836.35 ▲1.36
Featured Posts /wp-admin/edit.php?tag=featured3.3740.30

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Tidyhive Featured Posts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.18 ▼1.211.64 ▼0.3543.07 ▼0.55
Dashboard /wp-admin2,212 ▲244.88 ▼0.18108.24 ▲4.1539.90 ▲0.41
Posts /wp-admin/edit.php2,109 ▲202.05 ▲0.0341.82 ▲3.5135.50 ▲0.99
Add New Post /wp-admin/post-new.php1,538 ▲323.16 ▲0.03685.10 ▲72.7663.71 ▲11.57
Media Library /wp-admin/upload.php1,397 ▲94.23 ▲0.0395.52 ▼7.7140.00 ▼2.69
Featured Posts /wp-admin/edit.php?tag=featured1,2751.9736.7332.80

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
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • widget_thfp_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/tidyhive-featured-posts/admin/partials/thfp-admin-display.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_post_thumbnail_url() in wp-content/plugins/tidyhive-featured-posts/public/partials/thfp-public-display.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tidyhive-featured-posts/includes/class-thfp-widget.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === tidyhive-featured-posts === )
You can look at the official readme.txt

tidyhive-featured-posts/thfp.php 85% from 13 tests

This is the main PHP file of "Tidyhive Featured Posts" version 1.5.0, 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:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("tidyhive-featured-posts.php" instead of "thfp.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected459 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP13145586297
CSS32615137
JavaScript395425

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity2.62
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.39
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods33
▷ Static methods412.12%
▷ Public methods2884.85%
▷ Protected methods00.00%
▷ Private methods515.15%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/images/arrow-icons.png0.29KB0.45KB0.00%