79% freq-func-collection

Code Review | Freq Func COLLECTION

WordPress plugin Freq Func COLLECTION scored79%from 54 tests.

About plugin

  • Plugin page: freq-func-collection
  • Plugin version: 1.5.1
  • PHP compatiblity: 5.3.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3.2
  • WordPress version: 6.3.1
  • First release: Jan 28, 2019
  • Latest release: Oct 29, 2023
  • Number of updates: 31
  • Update frequency: every 56.1 days
  • Top authors: sunatmark (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,333 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 gracefully, with no errors

Server metrics [RAM: ▲0.18MB] [CPU: ▼2.02ms] Passed 4 tests

Server-side resources used by Freq Func COLLECTION
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1437.50 ▼3.13
Dashboard /wp-admin3.52 ▲0.2158.55 ▲9.45
Posts /wp-admin/edit.php3.63 ▲0.2853.15 ▲0.47
Add New Post /wp-admin/post-new.php6.08 ▲0.1982.36 ▼12.46
Media Library /wp-admin/upload.php3.42 ▲0.1937.32 ▲7.03
リソース /wp-admin/admin.php?page=ffc-config-resource3.4838.30
ウィジェット /wp-admin/admin.php?page=ffc-config-widget3.4946.56
メニューページ /wp-admin/admin.php?page=ffc-config-menupage3.6241.32
基本 /wp-admin/admin.php?page=ffc-config-basic3.4842.63
カスタム投稿タイプ /wp-admin/admin.php?page=ffc-config-posttype3.6841.54
定数 /wp-admin/admin.php?page=ffc-config-const3.4540.31
ログイン /wp-admin/admin.php?page=ffc-config-login3.4836.84

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Freq Func COLLECTION
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,994 ▲23314.48 ▲0.111.88 ▼0.0339.37 ▲0.76
Dashboard /wp-admin2,372 ▲1926.11 ▲0.41123.45 ▲31.3853.18 ▲12.78
Posts /wp-admin/edit.php2,306 ▲2063.27 ▲1.3353.65 ▲13.9444.99 ▲0.43
Add New Post /wp-admin/post-new.php1,560 ▲3423.71 ▲0.59647.12 ▼18.0435.63 ▼19.69
Media Library /wp-admin/upload.php1,440 ▲464.16 ▼0.0284.47 ▼19.2951.36 ▲7.04
リソース /wp-admin/admin.php?page=ffc-config-resource1,0823.0843.2080.53
ウィジェット /wp-admin/admin.php?page=ffc-config-widget1,4243.1438.5358.50
メニューページ /wp-admin/admin.php?page=ffc-config-menupage1,0733.0842.7357.86
基本 /wp-admin/admin.php?page=ffc-config-basic1,3353.0840.8184.98
カスタム投稿タイプ /wp-admin/admin.php?page=ffc-config-posttype1,0853.2940.9060.75
定数 /wp-admin/admin.php?page=ffc-config-const1,1063.3840.8448.29
ログイン /wp-admin/admin.php?page=ffc-config-login1,3803.7455.9768.33

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • ffc-config-version
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

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
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/freq-func-collection/addons/field/view/radio.php
    • > /wp-content/plugins/freq-func-collection/addons/field/view/checkbox.php
    • > /wp-content/plugins/freq-func-collection/addons/field/view/group.php
  • 191× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      require(): Failed opening required 'FFCOLLECTION_PLUGIN_DIR_PATHFFCOLLECTION_ADDONS_DIR_NAME/field/type/FfcFieldType.php' (include_path='.:/usr/share/php') in wp-content/plugins/freq-func-collection/addons/field/type/FfcFieldCheckbox.php on line 5
    • > PHP Notice
      Undefined variable: value in wp-content/plugins/freq-func-collection/config/view/posttype.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/freq-func-collection/config/view/example/menupage/image.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/freq-func-collection/config/view/example/taxonomy/date.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/freq-func-collection/addons/field/view/number.php:3
    • > PHP Warning
      Use of undefined constant FFCOLLECTION_ADDONS_DIR_NAME - assumed 'FFCOLLECTION_ADDONS_DIR_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/freq-func-collection/addons/field/type/FfcFieldCheckbox.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'FfcBaseClass' not found in wp-content/plugins/freq-func-collection/addons/widget/FfcWidget.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'FfcBaseClass' not found in wp-content/plugins/freq-func-collection/addons/field/type/FfcFieldType.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_ffc_menupage_options() in wp-content/plugins/freq-func-collection/config/view/example/menupage/radio.php:2
    • > PHP Warning
      Use of undefined constant FFCOLLECTION_PLUGIN_DIR_PATH - assumed 'FFCOLLECTION_PLUGIN_DIR_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/freq-func-collection/addons/field/type/FfcFieldColor.php on line 5

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 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: custom fields, custom post, login page, menu page

freq-func-collection/freq-func-collection.php Passed 13 tests

The entry point to "Freq Func COLLECTION" version 1.5.1 is a PHP file that has certain tags in its header comment area
105 characters long description:
サイト構築時によく行われるカスタマイズを機能としてまとめた機能集です。

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
Success! There were no dangerous files found in this plugin8,741 lines of code in 127 files:
LanguageFilesBlank linesComment linesLines of code
PHP988291,3367,054
JavaScript1972781,242
CSS8150400
PO File1162143
JSON1002

PHP code Passed 2 tests

An short overview of 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.49
Average class complexity23.00
▷ Minimum class complexity1.00
▷ Maximum class complexity122.00
Average method complexity4.69
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes38
▷ Abstract classes37.89%
▷ Concrete classes3592.11%
▷ Final classes00.00%
Methods226
▷ Static methods00.00%
▷ Public methods12153.54%
▷ Protected methods10546.46%
▷ Private methods00.00%
Functions21
▷ Named functions1571.43%
▷ Anonymous functions628.57%
Constants52
▷ Global constants713.46%
▷ Class constants4586.54%
▷ Public constants45100.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