10% post-favorite-h3

Code Review | Post favorite - H3

WordPress plugin Post favorite - H3 scored 10% from 54 tests.

About plugin

  • Plugin page: post-favorite-h3
  • Plugin version: 1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 22, 2020
  • Latest release: Jun 23, 2020
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: sakawsar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 327 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/post-favorite-h3/index.php+76
    Undefined variable: charset_collate

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

This is a short check of server-side resources used by Post favorite - H3
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.67 ▼8.43
Dashboard /wp-admin3.31 ▲0.0145.17 ▼5.41
Posts /wp-admin/edit.php3.36 ▲0.0150.63 ▼3.23
Add New Post /wp-admin/post-new.php5.89 ▲0.0180.87 ▼15.24
Media Library /wp-admin/upload.php3.24 ▲0.0132.45 ▼2.55
Follow Settings /wp-admin/options-general.php?page=follow_settings3.1825.60

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Post favorite - H3
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲15313.73 ▼0.555.80 ▲3.9936.41 ▼13.72
Dashboard /wp-admin2,210 ▲224.82 ▼0.07111.11 ▼1.0342.14 ▲0.99
Posts /wp-admin/edit.php2,093 ▲72.01 ▲0.0241.17 ▲4.4235.86 ▲0.87
Add New Post /wp-admin/post-new.php1,539 ▼323.18 ▲4.83614.73 ▲17.5650.90 ▼0.44
Media Library /wp-admin/upload.php1,389 ▲14.22 ▲0.0697.25 ▲3.0539.73 ▼0.24
Follow Settings /wp-admin/options-general.php?page=follow_settings7452.0526.4126.29

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_fev_add_remove
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=follow_settings
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'follow_settings_callback' not found or invalid function name

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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/post-favorite-h3/index.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === post-favorite-h3 === )
Please take inspiration from this readme.txt

post-favorite-h3/index.php 92% from 13 tests

This is the main PHP file of "Post favorite - H3" version 1.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: The principal plugin file should be the same as the plugin slug ("post-favorite-h3.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin235 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11212234
CSS1031

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/star-disable.png2.33KB2.04KB▼ 12.31%
img/star.png1.81KB1.86KB0.00%