67% friends-hot

Code Review | Friends Hot

WordPress plugin Friends Hot scored67%from 54 tests.

About plugin

  • Plugin page: friends-hot
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.0
  • WordPress version: 6.3.1
  • First release: Apr 23, 2013
  • Latest release: May 15, 2013
  • Number of updates: 8
  • Update frequency: every 2.9 days
  • Top authors: tiandi (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,401 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.91MB] [CPU: ▼37.47ms] Passed 4 tests

Analyzing server-side resources used by Friends Hot
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0443.30 ▲2.74
Dashboard /wp-admin3.03 ▼0.2725.72 ▼26.48
Posts /wp-admin/edit.php3.03 ▼0.3224.32 ▼24.57
Add New Post /wp-admin/post-new.php3.03 ▼2.8525.55 ▼82.60
Media Library /wp-admin/upload.php3.03 ▼0.1923.39 ▼16.23
Friends hot /wp-admin/options-general.php?page=Friends-hot3.0323.24

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Friends Hot
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.48 ▼0.132.05 ▲0.2945.73 ▲4.57
Dashboard /wp-admin2,210 ▲194.85 ▼1.04107.14 ▼4.3640.43 ▼2.40
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0837.08 ▲1.7531.81 ▼3.34
Add New Post /wp-admin/post-new.php1,541 ▲2223.45 ▲0.33642.05 ▼39.4958.14 ▼3.92
Media Library /wp-admin/upload.php1,392 ▲44.19 ▲0.01101.91 ▲0.6943.12 ▼2.83
Friends hot /wp-admin/options-general.php?page=Friends-hot7972.0628.2045.42

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% 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
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Friends-hot
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=Friends-hot
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=Friends-hot
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=Friends-hot
    • > Notice in wp-content/plugins/friends-hot/friendshot.php+18
    Undefined index: friendhotcounts
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Friends-hot
    • > Notice in wp-content/plugins/friends-hot/friendshot.php+59
    Undefined index: tiandibloghid
    • > GET request to /wp-admin/options-general.php?page=Friends-hot
    • > Notice in wp-content/plugins/friends-hot/friendshot.php+79
    Undefined index: cachetime

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/friends-hot/friendshot.php:194

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === friends-hot === )
  • Screenshots: Screenshot #1 (Frields hot page.) image missing
You can take inspiration from this readme.txt

friends-hot/friendshot.php 85% from 13 tests

The main PHP file in "Friends Hot" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 143 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("friends-hot.php" instead of "friendshot.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
There were no executable files found in this plugin219 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1199219

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png28.31KB10.82KB▼ 61.78%