66% wp-favorite-posts-extended

Code Review | WP Favorite Posts Extended

WordPress plugin WP Favorite Posts Extended scored66%from 54 tests.

About plugin

  • Plugin page: wp-favorite-posts...
  • Plugin version: 1.6.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.0
  • WordPress version: 6.3.1
  • First release: Nov 6, 2014
  • Latest release: Nov 6, 2014
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: avrilmaomao (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,814 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
Installer ran successfully

Server metrics [RAM: ▼0.14MB] [CPU: ▼22.56ms] Passed 4 tests

This is a short check of server-side resources used by WP Favorite Posts Extended
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0728.79 ▼14.08
Dashboard /wp-admin3.23 ▼0.0730.14 ▼24.62
Posts /wp-admin/edit.php3.30 ▼0.0536.95 ▼18.69
Add New Post /wp-admin/post-new.php5.45 ▼0.4469.69 ▼32.86
Media Library /wp-admin/upload.php3.24 ▲0.0130.28 ▼7.47
WP Favorite Posts /wp-admin/options-general.php?page=wp-favorite-posts3.2127.51

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WP Favorite Posts Extended
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲14413.80 ▼0.489.57 ▲7.7842.53 ▼0.59
Dashboard /wp-admin2,201 ▲245.63 ▲0.0493.46 ▲5.9545.28 ▲2.50
Posts /wp-admin/edit.php2,106 ▲32.00 ▲0.0340.16 ▼2.9338.37 ▼0.90
Add New Post /wp-admin/post-new.php1,533 ▲523.07 ▲0.04666.90 ▲46.5056.40 ▲1.91
Media Library /wp-admin/upload.php1,406 ▲124.25 ▲0.05105.84 ▲4.0943.99 ▲0.02
WP Favorite Posts /wp-admin/options-general.php?page=wp-favorite-posts1,2741.7525.7626.76

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 30 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-favorite-posts
    • > Notice in wp-content/plugins/wp-favorite-posts-extended/wpfp-admin.php+258
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-favorite-posts-extended/wpfp-your-favs-widget.php
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wpfp_get_options() in wp-content/plugins/wp-favorite-posts-extended/wpfp-page-template.php:42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-favorite-posts-extended/wpfp-admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-favorite-posts-extended/wp-favorite-posts.php:30
    • > PHP Notice
      Undefined variable: favorite_post_ids in wp-content/plugins/wp-favorite-posts-extended/wpfp-your-favs-widget.php on line 3
    • > PHP Notice
      Undefined variable: favorite_post_ids in wp-content/plugins/wp-favorite-posts-extended/wpfp-page-template.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-favorite-posts-extended/wpfp-widgets.php:97

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=wp-favorite-posts
    • > Network (severe)
    wp-content/plugins/wp-favorite-posts/img/icon_coffee.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=wp-favorite-posts
    • > Network (severe)
    wp-content/plugins/wp-favorite-posts/img/donate.gif - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=wp-favorite-posts
    • > Network (severe)
    wp-content/plugins/wp-favorite-posts/wpfp.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=wp-favorite-posts
    • > Network (severe)
    wp-content/plugins/wp-favorite-posts/img/star.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=wp-favorite-posts
    • > Network (severe)
    wp-content/plugins/wp-favorite-posts/img/heart.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=wp-favorite-posts
    • > Network (severe)
    wp-content/plugins/wp-favorite-posts/img/bullet_star.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Donate link: Please fix this invalid url: ""
You can look at the official readme.txt

wp-favorite-posts-extended/wp-favorite-posts.php 85% from 13 tests

This is the main PHP file of "WP Favorite Posts Extended" version 1.6.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: A good plugin description is longer than 10 characters (currently 0 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-favorite-posts-extended.php" instead of "wp-favorite-posts.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin981 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP610054870
Bourne Shell119859
JavaScript11128
Markdown113022
CSS1002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods466.67%
▷ Protected methods00.00%
▷ Private methods233.33%
Functions47
▷ Named functions47100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
7 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png38.30KB13.87KB▼ 63.79%
screenshot-3.png8.13KB3.79KB▼ 53.41%
img/heart.png0.73KB0.83KB0.00%
img/bullet_star.png0.32KB0.32KB▼ 1.81%
img/icon_coffee.png11.33KB5.83KB▼ 48.59%