83% 4nton-extensions

Code Review | Anton Extensions

WordPress plugin Anton Extensions scored83%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: 6.3.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

50+ active /1,318 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.26MB] [CPU: ▲2.27ms] Passed 4 tests

This is a short check of server-side resources used by Anton Extensions
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2545.17 ▲6.14
Dashboard /wp-admin3.61 ▲0.3156.10 ▲5.01
Posts /wp-admin/edit.php3.66 ▲0.3052.99 ▲2.57
Add New Post /wp-admin/post-new.php6.15 ▲0.2688.93 ▼1.78
Media Library /wp-admin/upload.php3.47 ▲0.2440.33 ▲3.27

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 51 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Anton Extensions
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4413.93 ▼0.461.85 ▲0.0044.49 ▲3.85
Dashboard /wp-admin2,211 ▲305.52 ▼0.2285.33 ▼14.9739.43 ▼3.14
Posts /wp-admin/edit.php2,116 ▲162.01 ▲0.0336.48 ▼3.8433.31 ▼2.51
Add New Post /wp-admin/post-new.php1,564 ▲3322.98 ▼0.09710.88 ▲101.8656.61 ▲9.07
Media Library /wp-admin/upload.php1,419 ▲194.21 ▼0.01104.69 ▲1.0444.30 ▼3.03

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 12× PHP files trigger errors when accessed directly with GET requests (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 wp_enqueue_style() in wp-content/plugins/4nton-extensions/lib/templates/user-avatar.php:5
    • > 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 _e() in wp-content/plugins/4nton-extensions/lib/admin/gf-activation.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ae_field_name() in wp-content/plugins/4nton-extensions/lib/admin/settings.php:5
    • > 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 wp_specialchars_decode() in wp-content/plugins/4nton-extensions/lib/admin/wp-mail.php:2
    • > 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 add_action() in wp-content/plugins/4nton-extensions/lib/core/features.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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

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, anthonycarboncom, media-upload, wp-loginphp, gravityform...

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

The main PHP script in "Anton Extensions" version 1.2.2 is automatically included on every request by WordPress
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 288 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("4nton-extensions.php" instead of "anton-extensions.php")

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
No dangerous file extensions were 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
There are no cyclomatic complexity problems 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

Using a strong compression for your PNG files is a great way to speed-up your plugin
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/avatar.png16.66KB8.82KB▼ 47.07%
assets/images/i.png0.30KB0.15KB▼ 48.36%
assets/images/edit-image.png0.75KB0.79KB0.00%