84% ethne-favourites

Code Review | Ethne Favorites Button

WordPress plugin Ethne Favorites Button scored84%from 54 tests.

About plugin

  • Plugin page: ethne-favourites
  • Plugin version: 1.0.8
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 13, 2022
  • Latest release: Oct 26, 2022
  • Number of updates: 7
  • Update frequency: every 2.6 days
  • Top authors: djrobertson (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /201 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

A check of server-side resources used by Ethne Favorites Button
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0437.95 ▼0.80
Dashboard /wp-admin3.34 ▼0.0143.80 ▼17.23
Posts /wp-admin/edit.php3.39 ▲0.0344.08 ▼4.07
Add New Post /wp-admin/post-new.php5.92 ▲0.0392.95 ▲0.03
Media Library /wp-admin/upload.php3.26 ▲0.0336.64 ▲2.21

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ethne Favorites Button
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲15313.86 ▼0.428.62 ▲7.0743.24 ▲2.11
Dashboard /wp-admin2,199 ▲255.51 ▼0.0681.70 ▼7.1537.31 ▼4.48
Posts /wp-admin/edit.php2,107 ▲72.01 ▲0.0039.52 ▲2.9236.32 ▲0.89
Add New Post /wp-admin/post-new.php1,544 ▲823.03 ▼0.12599.64 ▼84.6051.59 ▼2.05
Media Library /wp-admin/upload.php1,407 ▲74.24 ▲0.0593.90 ▼3.5340.60 ▼5.02

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_current_user_id() in wp-content/plugins/ethne-favourites/page-templates/favorites-display.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_current_user_id() in wp-content/plugins/ethne-favourites/page-templates/favorites-button.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
These attributes need your attention:
  • Requires at least: Version format is invalid
  • License uri: Invalid url: "license.txt"
The official readme.txt might help

ethne-favourites/ethne-favourites.php Passed 13 tests

The primary PHP file in "Ethne Favorites Button" version 1.0.8 is used by WordPress to initiate all plugin functionality
24 characters long description:
adds favorites shortcode

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected182 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP42236160
JavaScript12122

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity7.50
▷ Minimum class complexity2.00
▷ Maximum class complexity13.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected