64% my-favorite-link

Code Review | My Favorite Links

WordPress plugin My Favorite Links scored64%from 54 tests.

About plugin

  • Plugin page: my-favorite-link
  • Plugin version: 1.0
  • PHP compatiblity: 5.3.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.2
  • WordPress version: 6.3.1
  • First release: May 11, 2020
  • Latest release: May 12, 2020
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: carlitoxenlaweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /418 total downloads

Benchmarks

Plugin footprint 48% 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 gracefully, with no errors

Server metrics [RAM: ▼16.54MB] [CPU: ▼3,027,536.59ms] Passed 4 tests

An overview of server-side resources used by My Favorite Links
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /61.97 ▲58.4612,117,820.57 ▲12,117,781.33
Dashboard /wp-admin2.10 ▼59.855.96 ▼12,109,969.40
Posts /wp-admin/edit.php2.11 ▼1.308.00 ▼47.37
Add New Post /wp-admin/post-new.php2.10 ▼3.836.82 ▼95.29
Media Library /wp-admin/upload.php2.10 ▼1.176.16 ▼34.28

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: 2 new tables, 7 new options
New tables
wp_my_favorite_links
wp_my_favorite_links_cat
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
mfl_db_version
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for My Favorite Links
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲6914.25 ▼0.091.79 ▲0.0143.49 ▼2.52
Dashboard /wp-admin2,211 ▲345.59 ▼0.0789.62 ▼5.1939.95 ▼4.80
Posts /wp-admin/edit.php2,116 ▲161.99 ▲0.0534.13 ▼7.3236.55 ▼0.77
Add New Post /wp-admin/post-new.php1,540 ▲1423.17 ▲0.03680.87 ▼14.1063.41 ▲5.35
Media Library /wp-admin/upload.php1,416 ▲164.19 ▼0.0198.32 ▼20.3445.41 ▼3.53

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'my_favorite_link_db_check' not found or invalid function name
  • Zombie tables were found after uninstall: 2 tables
    • wp_my_favorite_links
    • wp_my_favorite_links_cat
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • mfl_db_version
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/my-favorite-link/views/favorite-form.php:88
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/my-favorite-link/views/favorite-list.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to a member function categories() on null in wp-content/plugins/my-favorite-link/views/favorite-list.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: bookmarks, links, favorite links, bookmarks for copywriters

my-favorite-link/my-favorite-links.php 92% from 13 tests

The main PHP file in "My Favorite Links" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("my-favorite-link.php" instead of "my-favorite-links.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin577 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP66310323
CSS1171102
PO File2262692
JavaScript14160

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity2.50
▷ Minimum class complexity2.00
▷ Maximum class complexity3.00
Average method complexity1.19
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1593.75%
▷ Protected methods00.00%
▷ Private methods16.25%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants787.50%
▷ Class constants112.50%
▷ Public constants1100.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