84% footnote-drawer

Code Review | Footnote Drawer

WordPress plugin Footnote Drawer scored84%from 54 tests.

About plugin

  • Plugin page: footnote-drawer
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.4
  • WordPress version: 6.3.1
  • First release: Jun 30, 2022
  • Latest release: Nov 26, 2023
  • Number of updates: 6
  • Update frequency: every 85.7 days
  • Top authors: solaito (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /331 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.90ms] Passed 4 tests

This is a short check of server-side resources used by Footnote Drawer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0337.39 ▼3.19
Dashboard /wp-admin3.35 ▲0.0546.59 ▼3.70
Posts /wp-admin/edit.php3.40 ▲0.0443.34 ▼2.56
Add New Post /wp-admin/post-new.php5.93 ▲0.0483.85 ▼14.13
Media Library /wp-admin/upload.php3.27 ▲0.0435.01 ▼1.58
Footnote Drawer /wp-admin/options-general.php?page=footnote-drawer3.2430.84

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Footnote Drawer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲6514.72 ▼0.035.64 ▲3.9136.59 ▼6.97
Dashboard /wp-admin2,202 ▲245.61 ▼0.1195.98 ▼13.6542.99 ▼0.03
Posts /wp-admin/edit.php2,101 ▲42.01 ▲0.0334.67 ▼4.1535.91 ▲1.63
Add New Post /wp-admin/post-new.php1,529 ▼023.42 ▲0.18672.27 ▲22.2457.18 ▲6.71
Media Library /wp-admin/upload.php1,404 ▲74.14 ▼0.1497.56 ▼1.0642.45 ▲1.50
Footnote Drawer /wp-admin/options-general.php?page=footnote-drawer7932.0027.0627.89

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% 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 trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/footnote-drawer/footnote-drawer.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/footnote-drawer/includes/options-page.php:119

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: footnote, drawer, cite, footnotes

footnote-drawer/footnote-drawer.php Passed 13 tests

"Footnote Drawer" version 1.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
29 characters long description:
View Footnotes in the drawer.

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
Everything looks great! No dangerous files found in this plugin352 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP33721196
Sass116179
CSS16176
JavaScript1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity4.50
▷ Minimum class complexity4.00
▷ Maximum class complexity5.00
Average method complexity1.47
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1493.33%
▷ Protected methods00.00%
▷ Private methods16.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants330.00%
▷ Class constants770.00%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin