99% acf-relationship-mime-type-filter

Code Review | ACF - Relationship MIME type filter

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

About plugin

  • Plugin page: acf-relationship-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 5.8.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 / 948 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼148.44ms] Passed 4 tests

Server-side resources used by ACF - Relationship MIME type filter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0031.40 ▲5.48
Dashboard /wp-admin3.06 ▼0.0030.05 ▼6.53
Posts /wp-admin/edit.php3.11 ▲0.0029.53 ▼1.42
Add New Post /wp-admin/post-new.php5.42 ▼0.0268.08 ▼584.14
Media Library /wp-admin/upload.php3.00 ▲0.0023.34 ▼1.68

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: no files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for ACF - Relationship MIME type filter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,666 ▲6515.62 ▲0.495.79 ▼1.1975.03 ▼8.29
Dashboard /wp-admin2,930 ▲346.13 ▲0.02116.90 ▼11.66167.78 ▼14.54
Posts /wp-admin/edit.php2,743 ▲33.22 ▼0.0262.75 ▼2.25129.54 ▼13.00
Add New Post /wp-admin/post-new.php3,807 ▲10918.39 ▲0.39430.55 ▼28.46165.95 ▲4.08
Media Library /wp-admin/upload.php1,752 ▼35.51 ▼0.04145.19 ▼5.09186.05 ▲0.97

Uninstaller [IO: ✅] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

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)
Everything seems fine, however this is by no means an exhaustive test

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
The SRP test was a success

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 83% from 29 tests

readme.txt 81% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tested up to: Version format is invalid
  • Requires at least: Version format is invalid
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
Please take inspiration from this readme.txt

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

"ACF - Relationship MIME type filter" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • 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")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable 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

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
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