78% autocomplete-for-calculated-fields-form

Code Review | Autocomplete for Calculated Fields Form

WordPress plugin Autocomplete for Calculated Fields Form scored78%from 54 tests.

About plugin

  • Plugin page: autocomplete-for-...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Feb 15, 2023
  • Latest release: Aug 10, 2023
  • Number of updates: 5
  • Update frequency: every 35.2 days
  • Top authors: codepeople (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /512 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.03MB] [CPU: ▼3.60ms] Passed 4 tests

Analyzing server-side resources used by Autocomplete for Calculated Fields Form
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0334.70 ▼6.35
Dashboard /wp-admin3.33 ▲0.0344.17 ▼3.37
Posts /wp-admin/edit.php3.38 ▲0.0347.53 ▼2.02
Add New Post /wp-admin/post-new.php5.91 ▲0.03111.59 ▲22.87
Media Library /wp-admin/upload.php3.26 ▲0.0333.96 ▼2.66

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Autocomplete for Calculated Fields Form
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,861 ▲10413.20 ▼1.232.04 ▼1.0242.08 ▼8.77
Dashboard /wp-admin2,245 ▲605.79 ▲0.87100.22 ▼15.9975.98 ▲27.32
Posts /wp-admin/edit.php2,089 ▼02.05 ▼0.0040.03 ▲4.0547.85 ▲10.62
Add New Post /wp-admin/post-new.php1,536 ▲321.08 ▼2.06697.85 ▲29.0353.11 ▼10.94
Media Library /wp-admin/upload.php1,388 ▲34.21 ▲0.0196.76 ▼13.3840.58 ▼6.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/autocomplete-for-calculated-fields-form/classes/autocomplete.clss.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/autocomplete-for-calculated-fields-form/cff-autocomplete.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: terms suggestion, words, music cff, autocomplete, text field

autocomplete-for-calculated-fields-form/cff-autocomplete.php 85% from 13 tests

"Autocomplete for Calculated Fields Form" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("autocomplete-for-calculated-fields-form.php" instead of "cff-autocomplete.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin310 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP23025178
JavaScript2180106
PO File12226

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity15.50
▷ Minimum class complexity12.00
▷ Maximum class complexity19.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.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
No PNG files were detected