72% cm-footnotes

Code Review | CM Footnotes

WordPress plugin CM Footnotes scored72%from 54 tests.

About plugin

  • Plugin page: cm-footnotes
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 3, 2015
  • Latest release: Jul 23, 2023
  • Number of updates: 256
  • Update frequency: every 11.6 days
  • Top authors: CreativeMindsSolutions (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active /10,549 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼0.68ms] Passed 4 tests

Analyzing server-side resources used by CM Footnotes
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1537.39 ▲0.68
Dashboard /wp-admin3.51 ▲0.2043.75 ▼13.93
Posts /wp-admin/edit.php3.56 ▲0.2048.51 ▲4.90
Add New Post /wp-admin/post-new.php6.05 ▲0.1698.05 ▲5.63
Media Library /wp-admin/upload.php3.37 ▲0.1439.92 ▲8.06
Upgrade ➤ /wp-admin/admin.php?page=cmf_pro3.3832.27
User Guide /wp-admin/admin.php?page=cmf_about3.50441.73
Settings /wp-admin/admin.php?page=cmf_settings3.4440.24

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

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

Browser metrics Passed 4 tests

A check of browser resources used by CM Footnotes
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲15813.85 ▼0.487.41 ▲5.7938.73 ▼1.27
Dashboard /wp-admin2,234 ▲575.58 ▲0.0684.36 ▼1.6982.40 ▲41.68
Posts /wp-admin/edit.php2,142 ▲422.08 ▲0.0739.74 ▲4.6436.89 ▲1.05
Add New Post /wp-admin/post-new.php6,342 ▲4,81420.96 ▼2.07921.38 ▲268.9781.10 ▲28.76
Media Library /wp-admin/upload.php1,436 ▲334.23 ▼0.03100.91 ▲0.8582.65 ▲36.21
Upgrade ➤ /wp-admin/admin.php?page=cmf_pro1,7562.2334.6998.81
User Guide /wp-admin/admin.php?page=cmf_about3,14015.23292.03171.18
Settings /wp-admin/admin.php?page=cmf_settings2,1973.1260.9267.29

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • cmf_options
    • widget_recent-posts

Smoke tests 25% 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 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
The following issues need your attention
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/cm-footnotes/views/backend/admin_extensions.php
    • > /wp-content/plugins/cm-footnotes/views/backend/admin_about.php
    • > /wp-content/plugins/cm-footnotes/views/backend/admin_nav.php
  • 16× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant CMF_MENU_OPTION - assumed 'CMF_MENU_OPTION' (this will throw an Error in a future version of PHP) in wp-content/plugins/cm-footnotes/views/backend/admin_template.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cm-footnotes/cm-footnotes.php:91
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cm-footnotes/package/views/userguide_free.php:8
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/cm-footnotes/views/backend/admin_nav.php on line 5
    • > PHP Warning
      Use of undefined constant CMTOC_NAME - assumed 'CMTOC_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/cm-footnotes/views/backend/admin_about.php on line 4
    • > PHP Warning
      Use of undefined constant CMTOC_URL - assumed 'CMTOC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/cm-footnotes/views/backend/admin_about.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function com\\cminds\\footnotes\\settings\\plugin_dir_path() in wp-content/plugins/cm-footnotes/settings/Settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function com\\cminds\\footnotes\\settings\\plugin_dir_path() in wp-content/plugins/cm-footnotes/settings/CMF_Settings.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'CMF_Free' not found in wp-content/plugins/cm-footnotes/settings/config.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cm-footnotes/package/cminds-plugin-config.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=cmf_about
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
    • > GET request to /wp-admin/admin.php?page=cmf_about
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: bibliography, endnotes, citation, referencing, footnote

cm-footnotes/cm-footnotes.php Passed 13 tests

Analyzing the main PHP file in "CM Footnotes" version 2.1.1
89 characters long description:
FREE Version! Adds the footnote with the definitions for post/page and custom post types.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected10,797 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP199906376,121
JavaScript10204652,371
CSS82691392,305

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity63.00
▷ Minimum class complexity1.00
▷ Maximum class complexity254.00
Average method complexity3.69
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes00.00%
Methods162
▷ Static methods9055.56%
▷ Public methods13885.19%
▷ Protected methods2414.81%
▷ Private methods00.00%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
Constants38
▷ Global constants1642.11%
▷ Class constants2257.89%
▷ Public constants22100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
56 PNG files occupy 0.57MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/help_hover.png0.85KB0.87KB0.00%
package/css/images/ui-icons_cd0a0a_256x240.png4.44KB4.17KB▼ 6.02%
assets/css/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%
assets/css/images/ui-bg_flat_0_aaaaaa_40x100.png0.21KB0.08KB▼ 58.96%
package/css/images/ui-icons_454545_256x240.png6.83KB4.17KB▼ 38.86%