83% fns-favorite-post

Code Review | FNS Favorite post

WordPress plugin FNS Favorite post scored83%from 54 tests.

About plugin

  • Plugin page: fns-favorite-post
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Feb 1, 2017
  • Latest release: Feb 1, 2017
  • Number of updates: 2
  • Update frequency: every 2.5 days
  • Top authors: matata (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /516 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.22MB] [CPU: ▼21.99ms] Passed 4 tests

A check of server-side resources used by FNS Favorite post
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0535.23 ▼1.30
Dashboard /wp-admin3.08 ▼0.2624.50 ▼35.50
Posts /wp-admin/edit.php3.22 ▼0.1426.63 ▼17.86
Add New Post /wp-admin/post-new.php5.46 ▼0.4262.94 ▼30.99
Media Library /wp-admin/upload.php3.17 ▼0.0627.54 ▼3.60
FNS Favorite posts /wp-admin/options-general.php?page=fns-favorite-post3.2733.07

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 15 new options
New WordPress options
ffp_posttype
widget_recent-posts
ffp_add
widget_theysaidso_widget
widget_ffp_widget
widget_recent-comments
ffp_no
ffp_version
ffp_icon
can_compress_scripts
...

Browser metrics Passed 4 tests

FNS Favorite post: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,879 ▲13313.41 ▼0.888.18 ▲6.4941.57 ▲4.66
Dashboard /wp-admin2,202 ▲255.60 ▲0.0384.99 ▼10.6640.30 ▼1.02
Posts /wp-admin/edit.php2,101 ▲11.98 ▼0.0333.76 ▼1.6633.90 ▼3.01
Add New Post /wp-admin/post-new.php1,531 ▲323.19 ▲0.10657.54 ▼12.2552.18 ▼11.47
Media Library /wp-admin/upload.php1,404 ▲14.20 ▲0.0396.39 ▼8.2342.37 ▼2.17
FNS Favorite posts /wp-admin/options-general.php?page=fns-favorite-post9052.0023.1234.03

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 15 options in the database
    • ffp_remove
    • widget_recent-comments
    • widget_ffp_widget
    • widget_theysaidso_widget
    • widget_recent-posts
    • ffp_no
    • ffp_icon
    • ffp_posttype
    • db_upgraded
    • ffp_hide
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/fns-favorite-post/ffp-admin-page.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Donate link: Please fix this invalid url: ""
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === fns-favorite-post === )
The official readme.txt is a good inspiration

fns-favorite-post/fns-favorite-post.php 85% from 13 tests

The entry point to "FNS Favorite post" version 1.0.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Domain Path: The domain path must begin with a forward slash character ("/")
  • Domain Path: The domain path should use only dashes and lowercase characters ("")

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 plugin5,388 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
CSS30132,331
PHP23030285
JavaScript171101

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin