78% my-faves

Code Review | My Faves for WP

WordPress plugin My Faves for WP scored78%from 54 tests.

About plugin

  • Plugin page: my-faves
  • Plugin version: 1.2.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0-6.0
  • WordPress version: 6.3.1
  • First release: Mar 7, 2020
  • Latest release: Aug 4, 2022
  • Number of updates: 50
  • Update frequency: every 17.6 days
  • Top authors: sana.azmeh (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,921 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.18MB] [CPU: ▼5.09ms] Passed 4 tests

A check of server-side resources used by My Faves for WP
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1940.20 ▼6.70
Dashboard /wp-admin3.49 ▲0.1551.40 ▼15.42
Posts /wp-admin/edit.php3.60 ▲0.2550.81 ▲1.25
Add New Post /wp-admin/post-new.php6.09 ▲0.2197.25 ▲0.50
Media Library /wp-admin/upload.php3.41 ▲0.1841.24 ▲6.13
Tags /wp-admin/edit-tags.php?taxonomy=myfaves_tags&post_type=myfaves3.4034.85
All Faves /wp-admin/edit.php?post_type=myfaves3.4540.69
Add New /wp-admin/post-new.php?post_type=myfaves3.5454.02
My Faves /wp-admin/options-general.php?page=myfaves-options3.3835.24

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 47 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by My Faves for WP
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲19813.72 ▼0.935.26 ▲3.4744.13 ▲0.21
Dashboard /wp-admin2,244 ▲564.84 ▼0.05103.15 ▼14.0241.09 ▼7.67
Posts /wp-admin/edit.php2,130 ▲381.99 ▼0.0239.49 ▼1.7535.62 ▼1.92
Add New Post /wp-admin/post-new.php1,552 ▲3523.41 ▲5.95657.39 ▲25.1754.68 ▲5.00
Media Library /wp-admin/upload.php1,429 ▲414.24 ▲0.04110.57 ▲8.0448.19 ▲2.90
Tags /wp-admin/edit-tags.php?taxonomy=myfaves_tags&post_type=myfaves1,2752.1326.1929.60
All Faves /wp-admin/edit.php?post_type=myfaves1,1101.9431.3029.99
Add New /wp-admin/post-new.php?post_type=myfaves2,4267.81178.3768.64
My Faves /wp-admin/options-general.php?page=myfaves-options9152.0423.6324.39

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/my-faves/public/partials/myfaves-public-display.php
    • > /wp-content/plugins/my-faves/admin/partials/myfaves-admin-display.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/my-faves/includes/service.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/my-faves/admin/myfaves-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/my-faves/includes/shortcodes/myfaves-shortcodes.php:178
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/my-faves/includes/functions.php:103
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/my-faves/includes/init.php:64

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues 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
Please fix the following attributes:
  • Screenshots: Please a description for screenshot #5 in my-faves/assets to your readme.txt
You can look at the official readme.txt

my-faves/myfaves.php 85% from 13 tests

"My Faves for WP" version 1.2.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("my-faves.php" instead of "myfaves.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
Everything looks great! No dangerous files found in this plugin16,811 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
SVG30129,026
JavaScript44101214,039
CSS41,449183,017
PHP17241589729

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity1.71
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.14
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods24
▷ Static methods28.33%
▷ Public methods1979.17%
▷ Protected methods00.00%
▷ Private methods520.83%
Functions34
▷ Named functions3397.06%
▷ Anonymous functions12.94%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin