90% my-favorites

Code Review | My Favorites

WordPress plugin My Favorites scored90%from 54 tests.

About plugin

  • Plugin page: my-favorites
  • Plugin version: 1.4.1
  • PHP compatiblity: 5.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.0
  • WordPress version: 6.3.1
  • First release: Jan 20, 2021
  • Latest release: Jun 12, 2022
  • Number of updates: 15
  • Update frequency: every 33.9 days
  • Top authors: takashimatsuyama (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

1,000+ active /8,045 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 gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.54ms] Passed 4 tests

Server-side resources used by My Favorites
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.89 ▼2.47
Dashboard /wp-admin3.32 ▲0.0248.19 ▼6.42
Posts /wp-admin/edit.php3.37 ▲0.0248.96 ▼5.98
Add New Post /wp-admin/post-new.php5.90 ▲0.0286.38 ▼7.30
Media Library /wp-admin/upload.php3.24 ▲0.0140.20 ▲3.38

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

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

Browser metrics Passed 4 tests

Checking browser requirements for My Favorites
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲11613.78 ▼0.808.06 ▲5.9444.54 ▲0.37
Dashboard /wp-admin2,206 ▲155.80 ▼0.09107.04 ▲3.1639.54 ▼3.02
Posts /wp-admin/edit.php2,092 ▲32.02 ▼0.0339.96 ▼2.1534.64 ▼3.64
Add New Post /wp-admin/post-new.php1,533 ▲1923.38 ▲5.67686.91 ▲62.7155.27 ▼0.68
Media Library /wp-admin/upload.php1,385 ▼04.21 ▼0.07100.32 ▼1.1044.21 ▲0.66

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Donate link: Please fix this invalid url: ""
Please take inspiration from this readme.txt

my-favorites/my-favorites.php Passed 13 tests

This is the main PHP file of "My Favorites" version 1.4.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
41 characters long description:
Save user's favorite posts and list them.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,044 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP75041394
CSS31528298
JavaScript23558232
Markdown129060
PO File191142
SVG10018

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity7.17
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity3.31
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods16
▷ Static methods743.75%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants685.71%
▷ Class constants114.29%
▷ Public constants1100.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
PNG images were not found in this plugin