94% acf-meio-mask-field

Code Review | ACF Meio Mask Field

WordPress plugin ACF Meio Mask Field scored 94% from 54 tests.

About plugin

  • Plugin page: acf-meio-mask-field
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.6.1
  • WordPress version: 5.9.2
  • First release: Sep 20, 2013
  • Latest release: Sep 20, 2013
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: casepress (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,245 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.02MB] [CPU: ▼319.60ms] Passed 4 tests

An overview of server-side resources used by ACF Meio Mask Field
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0158.20 ▼5.44
Dashboard /wp-admin3.42 ▲0.0038.73 ▼17.94
Posts /wp-admin/edit.php3.65 ▲0.0136.99 ▲1.25
Add New Post /wp-admin/post-new.php6.89 ▼0.0994.99 ▼1,254.43
Media Library /wp-admin/upload.php3.30 ▲0.0028.51 ▼0.59

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: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for ACF Meio Mask Field
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,785 ▲3115.17 ▼0.866.08 ▼2.912.33 ▼0.32
Dashboard /wp-admin2,895 ▲416.18 ▲0.05125.47 ▼65.73163.53 ▼22.46
Posts /wp-admin/edit.php2,694 ▲43.23 ▼0.0162.97 ▼2.18142.28 ▼50.89
Add New Post /wp-admin/post-new.php1,672 ▲1121.57 ▲6.01440.59 ▲8.40173.77 ▲3.12
Media Library /wp-admin/upload.php1,695 ▼35.52 ▼0.02141.21 ▼3.39186.55 ▲0.48

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/acf-meio-mask-field/acf_meio_mask_field.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acf-meio-mask-field/acf_meio_mask.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (screenshot-1.png - shows active state of the like button.) image missing
Please take inspiration from this readme.txt

acf-meio-mask-field/acf_meio_mask.php 92% from 13 tests

"ACF Meio Mask Field" 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: Name the main plugin file the same as the plugin slug ("acf-meio-mask-field.php" instead of "acf_meio_mask.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 plugin781 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2116113532
PHP23861190
PO File1202056
Markdown1103

PHP code Passed 2 tests

This is a very shot review 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.14
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png34.73KB13.99KB▼ 59.73%