84% favorite-links-widget

Code Review | Favorite Links Widget

WordPress plugin Favorite Links Widget scored84%from 54 tests.

About plugin

  • Plugin page: favorite-links-wi...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 23, 2015
  • Latest release: Dec 15, 2016
  • Number of updates: 11
  • Update frequency: every 40.8 days
  • Top authors: anillabs (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /3,496 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.13ms] Passed 4 tests

An overview of server-side resources used by Favorite Links Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.16 ▼5.10
Dashboard /wp-admin3.31 ▲0.0144.14 ▼2.88
Posts /wp-admin/edit.php3.36 ▲0.0145.44 ▼0.69
Add New Post /wp-admin/post-new.php5.89 ▲0.0180.93 ▼18.70
Media Library /wp-admin/upload.php3.24 ▲0.0133.54 ▼1.84

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_fl_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Favorite Links Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.06 ▼1.315.30 ▲3.5542.21 ▼1.64
Dashboard /wp-admin2,203 ▲154.86 ▼1.02108.79 ▼1.4638.20 ▼3.61
Posts /wp-admin/edit.php2,089 ▼32.16 ▲0.1239.15 ▼1.3535.06 ▼2.94
Add New Post /wp-admin/post-new.php1,528 ▼1622.96 ▲4.58643.69 ▲58.3059.15 ▲0.92
Media Library /wp-admin/upload.php1,385 ▼34.22 ▲0.0295.68 ▼1.7741.83 ▼4.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_fl_widget
    • widget_theysaidso_widget

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
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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/favorite-links-widget/FavoriteLinksWidget.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

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
Please fix the following attributes:
  • Requires at least: Version format is invalid
Please take inspiration from this readme.txt

favorite-links-widget/FavoriteLinksWidget.php 92% from 13 tests

Analyzing the main PHP file in "Favorite Links Widget" version 1.3
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("favorite-links-widget.php" instead of "FavoriteLinksWidget.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
No dangerous file extensions were detected167 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14510167

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity44.00
▷ Minimum class complexity44.00
▷ Maximum class complexity44.00
Average method complexity11.75
▷ Minimum method complexity1.00
▷ Maximum method complexity22.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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin