93% advanced-custom-fields-multiple-coordinates

Code Review | Advanced Custom Fields: Multiple Coordinates

WordPress plugin Advanced Custom Fields: Multiple Coordinates scored 93% from 54 tests.

About plugin

  • Plugin page: advanced-custom-f...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.0-3.9.1
  • WordPress version: 5.9.2
  • First release: Oct 24, 2013
  • Latest release: Jun 10, 2014
  • Number of updates: 5
  • Update frequency: every 45.8 days
  • Top authors: web111se (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

40+ active / 2,300 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Server-side resources used by Advanced Custom Fields: Multiple Coordinates
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0157.02 ▲6.91
Dashboard /wp-admin3.41 ▲0.0130.84 ▼4.87
Posts /wp-admin/edit.php3.65 ▲0.0153.97 ▲0.46
Add New Post /wp-admin/post-new.php6.88 ▼0.0994.08 ▼1,166.24
Media Library /wp-admin/upload.php3.30 ▲0.0040.82 ▲14.39

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Custom Fields: Multiple Coordinates
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲7316.14 ▲0.496.40 ▲0.052.60 ▲0.15
Dashboard /wp-admin2,895 ▲386.09 ▼0.06118.47 ▼0.76161.03 ▼10.60
Posts /wp-admin/edit.php2,691 ▼03.24 ▲0.0079.11 ▲8.49144.30 ▼9.00
Add New Post /wp-admin/post-new.php1,752 ▲8621.48 ▲0.70462.23 ▲2.70193.11 ▲28.97
Media Library /wp-admin/upload.php1,698 ▲35.54 ▲0.02145.30 ▼1.82188.53 ▲2.10

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

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

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/advanced-custom-fields-multiple-coordinates/fields.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-custom-fields-multiple-coordinates/acf-multiple-coordinates.php:37

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 issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: Screenshot #1 (The plugin in action in the backend.) image not found
  • Tags: There are too many tags (14 tag instead of maximum 10)
The official readme.txt is a good inspiration

advanced-custom-fields-multiple-coordinates/acf-multiple-coordinates.php 92% from 13 tests

The primary PHP file in "Advanced Custom Fields: Multiple Coordinates" version 1.0.2 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("advanced-custom-fields-multiple-coordinates.php" instead of "acf-multiple-coordinates.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
No dangerous file extensions were detected302 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript148107201
PHP2239081
CSS161720

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.04
Average class complexity1.50
▷ Minimum class complexity1.00
▷ Maximum class complexity2.00
Average method complexity1.17
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.51MB with 0.32MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png522.25KB197.24KB▼ 62.23%