93% 4nton-extensions

Code Review | Anton Extensions

WordPress plugin Anton Extensions scored 93% from 54 tests.

About plugin

  • Plugin page: 4nton-extensions
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.0
  • WordPress version: 5.8.1
  • First release: Feb 5, 2018
  • Latest release: Jun 1, 2019
  • Number of updates: 39
  • Update frequency: every 12.4 days
  • Top authors: master buldog (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 944 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼181.35ms] Passed 4 tests

Server-side resources used by Anton Extensions
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.1623.85 ▲2.23
Dashboard /wp-admin3.10 ▲0.0433.04 ▼5.72
Posts /wp-admin/edit.php3.19 ▲0.0834.43 ▲1.32
Add New Post /wp-admin/post-new.php5.47 ▲0.0369.01 ▼720.51
Media Library /wp-admin/upload.php3.05 ▲0.0423.19 ▼0.50

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 51 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Anton Extensions
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,686 ▲8515.55 ▼0.034.90 ▼0.5875.15 ▲0.37
Dashboard /wp-admin2,950 ▲546.13 ▼0.01118.24 ▼32.11161.79 ▼20.72
Posts /wp-admin/edit.php2,761 ▲213.24 ▲0.0264.28 ▼1.72137.13 ▼6.31
Add New Post /wp-admin/post-new.php3,711 ▼9618.00 ▼0.07411.48 ▼41.47160.02 ▼0.81
Media Library /wp-admin/upload.php1,772 ▲205.43 ▼0.09143.11 ▲2.15184.14 ▲0.95

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
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 12× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/4nton-extensions/lib/core/ajax/single-image-crop.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ae_field_html() in wp-content/plugins/4nton-extensions/lib/admin/gf-errors.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ae_field_html() in wp-content/plugins/4nton-extensions/lib/admin/wordpress.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/4nton-extensions/lib/core/features.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/4nton-extensions/lib/admin/gf-activation.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ae_get_styles() in wp-content/plugins/4nton-extensions/lib/templates/wp-login.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ae_get_option() in wp-content/plugins/4nton-extensions/lib/templates/gf-activation.php:72
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_specialchars_decode() in wp-content/plugins/4nton-extensions/lib/admin/wp-mail.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/4nton-extensions/lib/core/ajax/user-avatar.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ae_field_html() in wp-content/plugins/4nton-extensions/lib/admin/wp-login.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: field, gravityform, ajax, wp-loginphp, anthonycarboncom...

4nton-extensions/anton-extensions.php 77% from 13 tests

This is the main PHP file of "Anton Extensions" version 1.2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 288 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("4nton-extensions.php" instead of "anton-extensions.php")
  • 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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected3,859 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP19107651,814
JavaScript592796
SVG100655
CSS615594

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity15.00
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions66
▷ Named functions66100.00%
▷ Anonymous functions00.00%
Constants19
▷ Global constants19100.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
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/default.png2.48KB0.13KB▼ 94.56%
assets/images/edit-image.png0.75KB0.79KB0.00%
assets/images/i.png0.30KB0.15KB▼ 48.36%
assets/images/avatar.png16.66KB8.82KB▼ 47.07%