90% calculated-fields-for-acf

Code Review | Calculated fields for ACF

WordPress plugin Calculated fields for ACF scored90%from 54 tests.

About plugin

  • Plugin page: calculated-fields...
  • Plugin version: 1.3.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9
  • WordPress version: 6.3.1
  • First release: Dec 5, 2019
  • Latest release: Feb 2, 2022
  • Number of updates: 31
  • Update frequency: every 25.6 days
  • Top authors: wundermatics (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

1,000+ active /14,889 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼11.46ms] Passed 4 tests

Analyzing server-side resources used by Calculated fields for ACF
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0935.98 ▼6.29
Dashboard /wp-admin3.38 ▲0.0444.59 ▼16.61
Posts /wp-admin/edit.php3.50 ▲0.1453.00 ▲2.83
Add New Post /wp-admin/post-new.php5.99 ▲0.1081.57 ▼25.75
Media Library /wp-admin/upload.php3.31 ▲0.0835.23 ▲2.81

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Calculated fields for ACF
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.71 ▲0.161.75 ▲0.1935.92 ▼2.99
Dashboard /wp-admin2,197 ▲175.56 ▼0.1292.69 ▲7.9742.50 ▼0.93
Posts /wp-admin/edit.php2,102 ▲21.98 ▼0.0440.02 ▲3.3935.23 ▲1.69
Add New Post /wp-admin/post-new.php1,530 ▼423.29 ▲5.14667.54 ▲18.7149.05 ▼15.77
Media Library /wp-admin/upload.php1,405 ▲24.18 ▼0.1391.64 ▼8.3241.68 ▼5.27

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 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 Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed: You can take inspiration from this readme.txt

calculated-fields-for-acf/calculated-fields-for-acf.php Passed 13 tests

The primary PHP file in "Calculated fields for ACF" version 1.3.2 is used by WordPress to initiate all plugin functionality
44 characters long description:
Simple field math for Advanced Custom Fields

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected1,748 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP142687251,655
JavaScript112088
JSON1005

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity44.88
▷ Minimum class complexity1.00
▷ Maximum class complexity101.00
Average method complexity6.04
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods71
▷ Static methods1825.35%
▷ Public methods5780.28%
▷ Protected methods00.00%
▷ Private methods1419.72%
Functions10
▷ Named functions880.00%
▷ Anonymous functions220.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin