73% acf-rrule-field

Code Review | ACF RRule Field

WordPress plugin ACF RRule Field scored73%from 54 tests.

About plugin

  • Plugin page: acf-rrule-field
  • Plugin version: 1.3.4
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Nov 19, 2020
  • Latest release: Nov 17, 2023
  • Number of updates: 21
  • Update frequency: every 52.1 days
  • Top authors: marcbelletre (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

80+ active /3,925 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼8.73ms] Passed 4 tests

A check of server-side resources used by ACF RRule Field
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.90 ▲4.67
Dashboard /wp-admin3.36 ▲0.0243.85 ▼30.04
Posts /wp-admin/edit.php3.48 ▲0.1243.73 ▼3.38
Add New Post /wp-admin/post-new.php5.95 ▲0.0688.79 ▼5.32
Media Library /wp-admin/upload.php3.29 ▲0.0634.82 ▲3.83

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for ACF RRule Field
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2814.21 ▼0.132.18 ▲0.0343.85 ▲5.62
Dashboard /wp-admin2,195 ▲155.55 ▼0.0690.67 ▼5.5941.92 ▼4.17
Posts /wp-admin/edit.php2,097 ▼61.96 ▲0.0139.87 ▼0.9636.79 ▼1.30
Add New Post /wp-admin/post-new.php1,526 ▼1023.09 ▲0.05611.13 ▼25.6864.11 ▲0.88
Media Library /wp-admin/upload.php1,394 ▼94.19 ▼0.0894.98 ▲0.0439.94 ▼1.85

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 111× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/acf-rrule-field/vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/acf-rrule-field/vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Doctrine\\Common\\Collections\\Expr\\Expression' not found in wp-content/plugins/acf-rrule-field/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/CompositeExpression.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Doctrine\\Common\\Collections\\ReadableCollection' not found in wp-content/plugins/acf-rrule-field/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Collection.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/acf-rrule-field/vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/acf-rrule-field/vendor/composer/installers/src/Composer/Installers/TaoInstaller.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/acf-rrule-field/vendor/composer/installers/src/Composer/Installers/FuelInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/acf-rrule-field/vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/acf-rrule-field/vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/acf-rrule-field/vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php:5

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention: The official readme.txt is a good inspiration

acf-rrule-field/acf-rrule.php 92% from 13 tests

The principal PHP file in "ACF RRule Field" v. 1.3.4 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("acf-rrule-field.php" instead of "acf-rrule.php")

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
These items require your attention
  • Do not distribute dangerous files with your plugin
    • .ps1 - Windows PowerShell Cmdlet in Windows
      • wp-content/plugins/acf-rrule-field/vendor/simshaun/recurr/test.ps1
9,492 lines of code in 188 files:
LanguageFilesBlank linesComment linesLines of code
PHP1621,7983,4397,865
JSON700669
Markdown51330305
reStructuredText6224241203
PO File17480169
YAML3300111
CSS123090
JavaScript1363465
PowerShell1138
Bourne Shell1227

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
These items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 152)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity6.69
▷ Minimum class complexity1.00
▷ Maximum class complexity161.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity152.00
Code structure
Namespaces11
Interfaces6
Traits1
Classes135
▷ Abstract classes42.96%
▷ Concrete classes13197.04%
▷ Final classes00.00%
Methods451
▷ Static methods5913.08%
▷ Public methods37984.04%
▷ Protected methods5712.64%
▷ Private methods153.33%
Functions72
▷ Named functions11.39%
▷ Anonymous functions7198.61%
Constants36
▷ Global constants00.00%
▷ Class constants36100.00%
▷ Public constants3288.89%

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
PNG images were not found in this plugin