89% acf-relationship-mime-type-filter

Code Review | ACF - Relationship MIME type filter

WordPress plugin ACF - Relationship MIME type filter scored89%from 54 tests.

About plugin

  • Plugin page: acf-relationship-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 28, 2016
  • Latest release: Jun 29, 2016
  • Number of updates: 10
  • Update frequency: every 165.5 days
  • Top authors: rahulsprajapati (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Analyzing server-side resources used by ACF - Relationship MIME type filter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.99 ▲0.14
Dashboard /wp-admin3.31 ▲0.0045.12 ▼7.54
Posts /wp-admin/edit.php3.36 ▲0.0046.83 ▼0.29
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.76 ▼3.94
Media Library /wp-admin/upload.php3.23 ▲0.0033.78 ▼2.61

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

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

Browser metrics Passed 4 tests

ACF - Relationship MIME type filter: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6813.27 ▼1.101.93 ▼0.0743.03 ▼1.95
Dashboard /wp-admin2,206 ▲215.86 ▼0.07106.23 ▼1.2438.88 ▼3.76
Posts /wp-admin/edit.php2,086 ▼61.99 ▼0.0238.94 ▲4.4034.27 ▲3.93
Add New Post /wp-admin/post-new.php1,528 ▼523.21 ▼0.15664.63 ▼20.4454.09 ▼6.05
Media Library /wp-admin/upload.php1,391 ▲34.32 ▲0.13102.31 ▲0.3642.73 ▼2.47

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Requires at least: Version not formatted correctly
  • Tags: You are using too many tags: 12 tag instead of maximum 10
  • Tested up to: Version not formatted correctly
You can take inspiration from this readme.txt

acf-relationship-mime-type-filter/acf-rmf.php 85% from 13 tests

Analyzing the main PHP file in "ACF - Relationship MIME type filter" version 1.0.0
You should first fix the following items:
  • 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
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("acf-relationship-mime-type-filter.php" instead of "acf-rmf.php")

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 plugin235 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP985400182
PO File17732
Markdown116021

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity2.67
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.48
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods21
▷ Static methods29.52%
▷ Public methods1780.95%
▷ Protected methods00.00%
▷ Private methods419.05%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected