10% wp2appir

Code Review | WP2APP

WordPress plugin WP2APP scored10%from 54 tests.

About plugin

  • Plugin page: wp2appir
  • Plugin version: 2.6.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 8, 2016
  • Latest release: Sep 7, 2020
  • Number of updates: 101
  • Update frequency: every 14.2 days
  • Top authors: ghasemy14 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /11,803 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/wp2appir/wp2appir.php+80
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.03MB] [CPU: ▼12.68ms] Passed 4 tests

This is a short check of server-side resources used by WP2APP
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1447.60 ▲2.20
Dashboard /wp-admin3.52 ▲0.2253.48 ▼7.64
Posts /wp-admin/edit.php3.53 ▲0.1750.60 ▲0.46
Add New Post /wp-admin/post-new.php5.57 ▼0.3281.54 ▼45.75
Media Library /wp-admin/upload.php3.35 ▲0.1245.26 ▲3.85
تنظیمات اصلی /wp-admin/admin.php?page=wp2appir/pages/hami_manager_primery.php3.4541.46
تنظیمات تپسل /wp-admin/admin.php?page=wp2appir/pages/tapsell.php3.3939.30
تنظیمات حساب کاربری /wp-admin/admin.php?page=wp2appir/register/register.php3.4041.39
تنظیمات نمایش مطالب /wp-admin/admin.php?page=wp2appir/pages/hami_manager_post_types.php3.3542.95
تنظیمات پوسته /wp-admin/admin.php?page=wp2appir/pages/wp2appir_theme_new.php3.4344.29
فروش فایل /wp-admin/admin.php?page=wp2appir/sale_meta/sale_meta.php3.4844.72
تنظیمات عدد /wp-admin/admin.php?page=wp2appir/pages/adver_addad_hami.php3.3738.54
تنظیمات منو /wp-admin/admin.php?page=wp2appir/pages/hami_manager_appost.php3.4457.97
ارسال نوتیفیکیشن /wp-admin/admin.php?page=wp2appir/pages/send_notif_hami.php3.3944.02

Server storage [IO: ▲3.75MB] [DB: ▲0.02MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 141 new files
Database: 7 new tables, 21 new options
New tables
wp_hami_mainpage
wp_hami_appost
wp_hami_set
wp_hami_appstatic
wp_wp2app_commission
wp_hami_slider
wp_wp2app_checkout
New WordPress options
wp2app_telg_default
wp2app_cats
theysaidso_admin_options
can_compress_scripts
hrt_telegram_chatid
db_upgraded
widget_theysaidso_widget
wp2app_custom_fields
hrt_telegram_token
widget_recent-comments
...

Browser metrics Passed 4 tests

An overview of browser requirements for WP2APP
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲15114.46 ▲0.261.98 ▲0.3244.29 ▼31.91
Dashboard /wp-admin2,288 ▲1035.88 ▲0.7298.57 ▼11.8087.69 ▲6.24
Posts /wp-admin/edit.php2,150 ▲612.01 ▲0.0040.79 ▼20.4643.74 ▲2.45
Add New Post /wp-admin/post-new.php6,531 ▲5,00320.59 ▼0.24961.42 ▲191.4664.60 ▼36.68
Media Library /wp-admin/upload.php1,449 ▲674.24 ▲0.12100.66 ▼35.2881.06 ▼6.33
تنظیمات اصلی /wp-admin/admin.php?page=wp2appir/pages/hami_manager_primery.php1,5063.0053.77121.93
تنظیمات تپسل /wp-admin/admin.php?page=wp2appir/pages/tapsell.php1,1022.0224.3660.32
تنظیمات حساب کاربری /wp-admin/admin.php?page=wp2appir/register/register.php1,5562.3641.6654.92
تنظیمات نمایش مطالب /wp-admin/admin.php?page=wp2appir/pages/hami_manager_post_types.php8712.0126.4537.70
تنظیمات پوسته /wp-admin/admin.php?page=wp2appir/pages/wp2appir_theme_new.php2,8064.53142.89144.53
فروش فایل /wp-admin/admin.php?page=wp2appir/sale_meta/sale_meta.php1,0841.8833.2644.15
تنظیمات عدد /wp-admin/admin.php?page=wp2appir/pages/adver_addad_hami.php8902.0327.4537.44
تنظیمات منو /wp-admin/admin.php?page=wp2appir/pages/hami_manager_appost.php1,5654.1363.54164.97
ارسال نوتیفیکیشن /wp-admin/admin.php?page=wp2appir/pages/send_notif_hami.php1,1492.2542.5453.94

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall successfully, leaving 7 tables in the database
    • wp_hami_appstatic
    • wp_hami_slider
    • wp_hami_mainpage
    • wp_wp2app_commission
    • wp_wp2app_checkout
    • wp_hami_appost
    • wp_hami_set
  • This plugin did not uninstall successfully, leaving 21 options in the database
    • theysaidso_admin_options
    • WP2APPIR_VERSION
    • can_compress_scripts
    • widget_recent-comments
    • hrt_telegram_chatid
    • wp2app_custom_fields
    • wp2app_cats
    • hrt_telegram_token
    • hrt_telegram_sign
    • hrt_lastmf_appost
    • ...

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp2appir/pages/hami_manager_primery.php
    • > Notice in wp-content/plugins/wp2appir/pages/hami_manager_primery.php+322
    Undefined index: txt_url_default_image
    • > GET request to /wp-admin/admin.php?page=wp2appir/pages/adver_addad_hami.php
    • > Notice in wp-content/plugins/wp2appir/pages/adver_addad_hami.php+102
    Undefined variable: _SESSION
    • > GET request to /wp-admin/admin.php?page=wp2appir/pages/adver_addad_hami.php
    • > Notice in wp-content/plugins/wp2appir/pages/adver_addad_hami.php+102
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=wp2appir/pages/hami_manager_appost.php
    • > Notice in wp-content/plugins/wp2appir/pages/hami_manager_appost.php+148
    Undefined variable: type
    • > GET request to /wp-admin/admin.php?page=wp2appir/pages/hami_manager_appost.php
    • > Notice in wp-content/plugins/wp2appir/pages/hami_manager_appost.php+149
    Undefined index: menu_app
    • > GET request to /wp-admin/admin.php?page=wp2appir/pages/hami_manager_appost.php
    • > Notice in wp-content/plugins/wp2appir/pages/hami_manager_appost.php+149
    Undefined index: menu_app_hami_planning

SRP 0% 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
The following issues need your attention
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp2appir/register/class/SmsIR_UltraFastSend.php
    • > /wp-content/plugins/wp2appir/pages/themes/theme4.php
    • > /wp-content/plugins/wp2appir/register/new_field.php
  • 26× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp2appir/pages/get_category_list.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_woocommerce_currency_symbol() in wp-content/plugins/wp2appir/account/tasv.php:9
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp2appir/sale_meta/sales.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp2appir/sale_meta/plans.php:136
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp2appir/sale_meta/class_sale_meta.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp2appir/pages/themes/theme6.php:51
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp2appir/pages/themes/theme8.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp2appir/pages/update_setting.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp2appir/pages/themes/theme2.php:71
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp2appir/pages/themes/theme5.php:66

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp2appir/pages/hami_manager_appost.php
    • > Network (severe)
    wp-content/plugins/wp2appir/assets/fonts/fontawesome-webfont.woff2?v=4.5.0 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots need descriptions #1, #2, #3 in wp2appir/assets to your readme.txt
The official readme.txt is a good inspiration

wp2appir/wp2appir.php 92% from 13 tests

The principal PHP file in "WP2APP" v. 2.6.2 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin15,732 lines of code in 103 files:
LanguageFilesBlank linesComment linesLines of code
PHP714,24559712,332
JavaScript192881692,439
SVG100655
CSS1228306

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 156)
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity31.38
▷ Minimum class complexity1.00
▷ Maximum class complexity175.00
Average method complexity4.21
▷ Minimum method complexity1.00
▷ Maximum method complexity156.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes24
▷ Abstract classes00.00%
▷ Concrete classes24100.00%
▷ Final classes00.00%
Methods228
▷ Static methods00.00%
▷ Public methods20589.91%
▷ Protected methods83.51%
▷ Private methods156.58%
Functions53
▷ Named functions53100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants880.00%
▷ Class constants220.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/web2app_logo1.png1.91KB1.18KB▼ 38.26%
assets/img/web2app_logo.png77.08KB30.14KB▼ 60.90%
assets/img/faq.png1.06KB0.81KB▼ 23.71%
assets/img/smart-phone.png1.22KB0.69KB▼ 43.14%
assets/img/support.png1.21KB0.96KB▼ 20.87%