74% friendship-meter

Code Review | Friendship Meter

WordPress plugin Friendship Meter scored74%from 54 tests.

About plugin

  • Plugin page: friendship-meter
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 6.3.1
  • First release: May 22, 2013
  • Latest release: May 22, 2013
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: nirob.19 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,099 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼1.71MB] [CPU: ▼50.40ms] Passed 4 tests

This is a short check of server-side resources used by Friendship Meter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.29 ▼1.179.35 ▼37.35
Dashboard /wp-admin2.30 ▼1.0410.43 ▼44.34
Posts /wp-admin/edit.php2.30 ▼1.0511.48 ▼35.75
Add New Post /wp-admin/post-new.php2.30 ▼3.589.72 ▼84.17
Media Library /wp-admin/upload.php2.30 ▼0.9310.47 ▼27.62

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Friendship Meter
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▼0.081.56 ▼0.5438.08 ▼18.70
Dashboard /wp-admin2,206 ▲214.83 ▼0.04111.35 ▲11.4845.54 ▲6.16
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0438.47 ▲4.2137.11 ▲2.51
Add New Post /wp-admin/post-new.php1,542 ▲723.03 ▼0.31630.84 ▼26.2849.13 ▼10.10
Media Library /wp-admin/upload.php1,388 ▼04.27 ▲0.0294.63 ▼10.2540.47 ▼4.95

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method frinedship_meter_scale::meter_init() should not be called statically
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/friendship-meter/friendship-meter.php:167

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add an image for screenshot #1 (This screenshot description corresponds to friendship-meter.jpg.)
You can look at the official readme.txt

friendship-meter/friendship-meter.php 92% from 13 tests

The entry point to "Friendship Meter" version 1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 399 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected138 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1229138

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.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
PNG images were not found in this plugin