77% wptouch

Code Review | WPtouch - Make your WordPress Website Mobile-Friendly

WordPress plugin WPtouch - Make your WordPress Website Mobile-Friendly scored77%from 54 tests.

About plugin

  • Plugin page: wptouch
  • Plugin version: 4.3.56
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.3.1
  • WordPress version: 6.3.1
  • First release: May 4, 2008
  • Latest release: Nov 23, 2023
  • Number of updates: 1,825
  • Update frequency: every 3.1 days
  • Top authors: bravenewcode (93.64%)wptouch (4.38%)

Code review

54 tests

User reviews

313 reviews

Install metrics

90,000+ active /14,253,051 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.83MB] [CPU: ▲12.54ms] 75% from 4 tests

This is a short check of server-side resources used by WPtouch - Make your WordPress Website Mobile-Friendly
Please have a look at the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 694.68ms on /wp-admin/admin.php?page=wptouch-admin-general-settings)
PageMemory (MB)CPU Time (ms)
Home /5.29 ▲1.8355.19 ▲16.54
Dashboard /wp-admin5.18 ▲1.8760.81 ▲12.19
Posts /wp-admin/edit.php5.23 ▲1.8758.89 ▲10.61
Add New Post /wp-admin/post-new.php7.69 ▲1.81105.73 ▲10.81
Media Library /wp-admin/upload.php5.03 ▲1.8058.44 ▲25.61
Upgrade to Pro /wp-admin/admin.php?page=wptouch-admin-go-pro5.1250.82
Settings /wp-admin/admin.php?page=wptouch-admin-general-settings5.77694.68

Server storage [IO: ▲6.39MB] [DB: ▲0.06MB] 67% from 3 tests

Input-output and database impact of this plugin
These are issues you should consider
  • Illegal file modification detected: 10 files (0.00KB) outside of "wp-content/plugins/wptouch/" and "wp-content/uploads/"
    • (new file) wp-content/wptouch-data/lang/.empty
    • (new file) wp-content/wptouch-data/uploads/.empty
    • (new file) wp-content/wptouch-data/extensions/.empty
    • (new file) wp-content/wptouch-data/themes/.empty
    • (new file) wp-content/wptouch-data/backups/.empty
    • (new file) wp-content/wptouch-data/modules/.empty
    • (new file) wp-content/wptouch-data/temp/.empty
    • (new file) wp-content/wptouch-data/icons/custom/.empty
    • (new file) wp-content/wptouch-data/debug/.empty
    • (new file) wp-content/wptouch-data/cache/.empty
Filesystem: 484 new files
Database: no new tables, 12 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
wptouch_customizer_initialized_bauhaus
theme_mods_bauhaus
wptouch_menus_initialized
wpts_wptouch_pro
wpts_bncid
widget_theysaidso_widget
theysaidso_admin_options
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for WPtouch - Make your WordPress Website Mobile-Friendly
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲9314.29 ▼0.061.97 ▲0.3141.93 ▼2.87
Dashboard /wp-admin2,238 ▲585.67 ▼0.0188.50 ▼2.7282.95 ▲40.10
Posts /wp-admin/edit.php2,159 ▲562.05 ▲0.0940.70 ▲4.3639.49 ▲3.32
Add New Post /wp-admin/post-new.php1,731 ▲20222.23 ▼0.71748.16 ▲86.8564.43 ▲10.84
Media Library /wp-admin/upload.php1,455 ▲644.27 ▲0.1098.89 ▼2.4445.63 ▲3.69
Upgrade to Pro /wp-admin/admin.php?page=wptouch-admin-go-pro1,2092.5471.96122.76
Settings /wp-admin/admin.php?page=wptouch-admin-general-settings5,1834.77173.02107.17

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 12 options
    • wptouch_customizer_options_foundation
    • widget_recent-posts
    • wpts_wptouch_pro
    • widget_recent-comments
    • theysaidso_admin_options
    • wptouch_menus_initialized
    • widget_theysaidso_widget
    • db_upgraded
    • wptouch_customizer_initialized_bauhaus
    • theme_mods_bauhaus
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wptouch/themes/bauhaus/default/footer-top.php
    • > /wp-content/plugins/wptouch/include/html/pro.php
    • > /wp-content/plugins/wptouch/admin/settings/html/sites.php
    • > /wp-content/plugins/wptouch/admin/settings/html/free-newsletter-signup.php
  • 171× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant WPTOUCH_DIR - assumed 'WPTOUCH_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wptouch/themes/foundation/root-functions.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wptouch/admin/settings/html/redirect.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wptouch_have_icon_packs() in wp-content/plugins/wptouch/admin/settings/html/installed_icon_sets_ajax.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wptouch_admin_the_setting_desc() in wp-content/plugins/wptouch/admin/settings/include/sites.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wptouch/themes/foundation/modules/login/login-html.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wptouch/themes/bauhaus/default/functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wptouch/themes/bauhaus/default/404.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wptouch/themes/foundation/default/formerror.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wptouch_admin_the_setting_name() in wp-content/plugins/wptouch/admin/settings/html/image-upload.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function foundation_get_settings() in wp-content/plugins/wptouch/admin/settings/include/custom-latest-posts.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt might help

wptouch/wptouch.php 92% from 13 tests

Analyzing the main PHP file in "WPtouch - Make your WordPress Website Mobile-Friendly" version 4.3.56
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin44,467 lines of code in 321 files:
LanguageFilesBlank linesComment linesLines of code
PHP1793,63083016,596
CSS582,52579913,533
JavaScript722,1452,5198,878
PO File11,1751,9561,905
HTML41701,486
JSON3001,440
SVG4360629

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity35.81
▷ Minimum class complexity1.00
▷ Maximum class complexity529.00
Average method complexity3.91
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods251
▷ Static methods00.00%
▷ Public methods23192.03%
▷ Protected methods00.00%
▷ Private methods207.97%
Functions668
▷ Named functions668100.00%
▷ Anonymous functions00.00%
Constants110
▷ Global constants110100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
70 PNG files occupy 0.49MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/icons/elegant/Exclamation.png2.55KB2.08KB▼ 18.61%
resources/icons/elegant/rss.png5.28KB3.06KB▼ 42.00%
admin/images/icon-sets/thumbnails/project.png2.75KB1.91KB▼ 30.55%
admin/images/wptouch-admin-icon-xmas.png0.28KB0.31KB0.00%
admin/images/default-bookmark.png7.99KB8.54KB0.00%