78% avangpress

Code Review | AvangPress for WordPress

WordPress plugin AvangPress for WordPress scored78%from 54 tests.

About plugin

  • Plugin page: avangpress
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.2
  • WordPress version: 6.3.1
  • First release: Nov 9, 2018
  • Latest release: May 10, 2019
  • Number of updates: 3
  • Update frequency: every 62.0 days
  • Top authors: seifzadeh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /967 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.66MB] [CPU: ▲2.46ms] Passed 4 tests

Server-side resources used by AvangPress for WordPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.5150.47 ▼1.06
Dashboard /wp-admin4.05 ▲0.7459.50 ▲4.71
Posts /wp-admin/edit.php4.14 ▲0.7858.51 ▼0.69
Add New Post /wp-admin/post-new.php6.59 ▲0.70103.21 ▲6.86
Media Library /wp-admin/upload.php3.93 ▲0.7045.81 ▲7.95
Form /wp-admin/admin.php?page=avangpress-forms3.8234.50
Other /wp-admin/admin.php?page=avangpress-other3.9943.55
AvangPress /wp-admin/admin.php?page=avangpress3.9538.22
Integrations /wp-admin/admin.php?page=avangpress-integrations4.0244.99

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 186 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
widget_avangpress_form_widget
widget_recent-comments
avangpress
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by AvangPress for WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲6214.25 ▼0.191.74 ▲0.0844.02 ▲2.04
Dashboard /wp-admin2,217 ▲405.57 ▼0.0991.99 ▼11.4776.93 ▲35.74
Posts /wp-admin/edit.php2,137 ▲371.98 ▼0.0241.81 ▲0.3433.85 ▼3.98
Add New Post /wp-admin/post-new.php1,570 ▲4423.24 ▼0.33685.98 ▼12.5759.29 ▲2.43
Media Library /wp-admin/upload.php1,431 ▲284.14 ▼0.08108.91 ▲2.6368.37 ▲21.15
Form /wp-admin/admin.php?page=avangpress-forms8951.8640.5951.49
Other /wp-admin/admin.php?page=avangpress-other9981.9428.3646.28
AvangPress /wp-admin/admin.php?page=avangpress9381.7324.8536.57
Integrations /wp-admin/admin.php?page=avangpress-integrations1,1061.8526.3031.67

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_theysaidso_widget
    • avangpress
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_avangpress_form_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 36× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'AvangEmailApi_Base' not found in wp-content/plugins/avangpress/includes/api/vendor/avangdev/avang-php/AvangEmailApi/Cache/Abstract.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_theme() in wp-content/plugins/avangpress/includes/forms/views/tabs/form-appearance.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'AvangEmailApi_Base' not found in wp-content/plugins/avangpress/includes/api/vendor/avangdev/avang-php/AvangEmailApi/Endpoint/ListSegments.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function avangpress_register_integration() in wp-content/plugins/avangpress/integrations/wpforms/bootstrap.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/avangpress/integrations/ninja-forms-2/admin-before.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/avangpress/includes/views/parts/lists-overview.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/avangpress/integrations/ninja-forms/admin-before.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function avangpress_register_integration() in wp-content/plugins/avangpress/integrations/ninja-forms/bootstrap.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/avangpress/integrations/gravity-forms/admin-before.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Avangpress_API_Exception' not found in wp-content/plugins/avangpress/includes/api/class-connection-exception.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=avangpress-integrations
    • > Network (severe)
    wp-content/plugins/avangpress/assets/js/integrations-admin.min.js?ver=1.0.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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 require attention:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
  • Screenshots: Add images for these screenshots: #1 (Create api key on avangemail), #2 (Config plugin)
You can look at the official readme.txt

avangpress/avangpress.php Passed 13 tests

"AvangPress for WordPress" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
49 characters long description:
AvangPress WordPress plugin by mehrdad seifzadeh.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected37,932 lines of code in 173 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript122,8774,64526,690
PHP1462,8836,6909,386
CSS9154701,728
JSON30057
XML12043
Markdown114020
HTML1208

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity11.87
▷ Minimum class complexity1.00
▷ Maximum class complexity116.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity71.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes94
▷ Abstract classes33.19%
▷ Concrete classes9196.81%
▷ Final classes11.10%
Methods661
▷ Static methods314.69%
▷ Public methods59590.02%
▷ Protected methods477.11%
▷ Private methods192.87%
Functions54
▷ Named functions5194.44%
▷ Anonymous functions35.56%
Constants22
▷ Global constants418.18%
▷ Class constants1881.82%
▷ Public constants18100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/icon.png1.90KB1.53KB▼ 19.39%
assets/img/logo.png1.26KB1.24KB▼ 2.24%
assets/img/logoavang.png6.70KB3.49KB▼ 47.96%