78% acf-madmimi-audience-list

Code Review | ACF: MadMimi Audience List

WordPress plugin ACF: MadMimi Audience List scored 78% from 54 tests.

About plugin

  • Plugin page: acf-madmimi-audie...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.3
  • WordPress version: 6.3.1
  • First release: Jul 17, 2015
  • Latest release: Jan 11, 2016
  • Number of updates: 3
  • Update frequency: every 59.7 days
  • Top authors: danielpataki (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

This is a short check of server-side resources used by ACF: MadMimi Audience List
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1743.90 ▲3.69
Dashboard /wp-admin3.48 ▲0.1843.64 ▼3.70
Posts /wp-admin/edit.php3.59 ▲0.2446.73 ▼1.17
Add New Post /wp-admin/post-new.php6.06 ▲0.1883.51 ▼9.35
Media Library /wp-admin/upload.php3.40 ▲0.1837.81 ▲5.03
MadMimi Settings /wp-admin/edit.php?post_type=acf&page=acf-madmimi_audience_list-settings3.2423.82

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for ACF: MadMimi Audience List
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9014.48 ▼0.172.04 ▲0.0844.18 ▲3.35
Dashboard /wp-admin2,206 ▲155.83 ▲0.0496.66 ▼1.9142.56 ▼4.83
Posts /wp-admin/edit.php2,086 ▼62.02 ▼0.0334.74 ▼3.4930.49 ▼0.05
Add New Post /wp-admin/post-new.php1,542 ▲918.42 ▼5.00631.21 ▼30.6566.51 ▲8.96
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.04102.41 ▼5.2646.20 ▼4.42
MadMimi Settings /wp-admin/edit.php?post_type=acf&page=acf-madmimi_audience_list-settings280.440.093.93

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

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

SRP 50% 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
Almost there! Just fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/acf-madmimi-audience-list/acf-madmimi_audience_list-v4.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/acf-madmimi-audience-list/acf-madmimi_audience_list-v5.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acf-madmimi-audience-list/acf-madmimi_audience_list.php:64

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/edit.php?post_type=acf&page=acf-madmimi_audience_list-settings
    • > Network (severe)
    wp-admin/edit.php?post_type=acf&page=acf-madmimi_audience_list-settings - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 93% 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: The official readme.txt is a good inspiration

acf-madmimi-audience-list/acf-madmimi_audience_list.php 92% from 13 tests

The primary PHP file in "ACF: MadMimi Audience List" version 1.0.2 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("acf-madmimi-audience-list.php" instead of "acf-madmimi_audience_list.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,241 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP53234621,178
PO File1171763

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity68.25
▷ Minimum class complexity17.00
▷ Maximum class complexity215.00
Average method complexity4.24
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods83
▷ Static methods910.84%
▷ Public methods4351.81%
▷ Protected methods00.00%
▷ Private methods4048.19%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected