68% wptoandroid

Code Review | WordPress To Android Plugin

WordPress plugin WordPress To Android Plugin scored68%from 54 tests.

About plugin

  • Plugin page: wptoandroid
  • Plugin version: 2.0-beta12...
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9
  • WordPress version: 6.3.1
  • First release: Feb 1, 2017
  • Latest release: Nov 10, 2017
  • Number of updates: 17
  • Update frequency: every 16.6 days
  • Top authors: tincholiguori (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

20+ active /6,911 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.44MB] [CPU: ▼24.67ms] Passed 4 tests

This is a short check of server-side resources used by WordPress To Android Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.85 ▲1.3947.32 ▲10.77
Dashboard /wp-admin4.40 ▲1.0534.43 ▼21.81
Posts /wp-admin/edit.php4.40 ▲1.0433.35 ▼12.64
Add New Post /wp-admin/post-new.php4.40 ▼1.4941.73 ▼64.49
Media Library /wp-admin/upload.php4.40 ▲1.1734.56 ▲0.28
info About us /wp-admin/admin.php?page=wta_wp_to_android_plugin_aboutus_settings4.4035.22
email Tell a friend /wp-admin/admin.php?page=wta_wp_to_android_plugin_tellfriend_settings4.4029.85
wallpaper Splash /wp-admin/admin.php?page=wta_wp_to_android_plugin_splash_settings4.4035.54
build Menues /wp-admin/admin.php?page=wta_wp_to_android_plugin_menues_settings4.4032.39
tag_faces Icons /wp-admin/admin.php?page=wta_wp_to_android_plugin_icon_settings4.4032.68
settings Main /wp-admin/admin.php?page=wta_wp_to_android_plugin_main_settings4.4032.70
WP to Android Settings /wp-admin/admin.php?page=wta_wp_to_android_plugin_settings4.4029.72
bubble_chart Navigation Header /wp-admin/admin.php?page=wta_wp_to_android_plugin_headernav_settings4.4033.36
android Generate APK /wp-admin/admin.php?page=wta_wp_to_android_plugin_generate_settings4.4032.74

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 39 new files
Database: no new tables, 16 new options
New WordPress options
wta_wp_to_android_posts_menu
wta_wp_to_android_app_navigation_48
wta_wp_to_android_token
theysaidso_admin_options
widget_recent-posts
wta_wp_to_android_galleries_menu
wta_wp_to_android_plugin_version
wta_wp_to_android_app_splash_48
wta_wp_to_android_pages_menu
widget_recent-comments
...

Browser metrics Passed 4 tests

Checking browser requirements for WordPress To Android Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,893 ▲14713.40 ▼0.961.65 ▼0.1038.20 ▼0.82
Dashboard /wp-admin2,306 ▲1185.14 ▼0.76112.05 ▲9.1840.99 ▲3.20
Posts /wp-admin/edit.php2,174 ▲852.53 ▲0.5038.52 ▲0.7534.85 ▲1.09
Add New Post /wp-admin/post-new.php1,348 ▼17115.67 ▼7.41291.48 ▼356.0716.65 ▼37.82
Media Library /wp-admin/upload.php1,492 ▲1014.51 ▲0.36109.29 ▲6.4557.14 ▲12.12
info About us /wp-admin/admin.php?page=wta_wp_to_android_plugin_aboutus_settings1,0911.9329.2529.05
email Tell a friend /wp-admin/admin.php?page=wta_wp_to_android_plugin_tellfriend_settings9131.9328.0028.81
wallpaper Splash /wp-admin/admin.php?page=wta_wp_to_android_plugin_splash_settings9231.9329.1326.12
build Menues /wp-admin/admin.php?page=wta_wp_to_android_plugin_menues_settings9461.9429.7827.75
tag_faces Icons /wp-admin/admin.php?page=wta_wp_to_android_plugin_icon_settings9261.9237.3226.92
settings Main /wp-admin/admin.php?page=wta_wp_to_android_plugin_main_settings1,8483.2570.4165.67
WP to Android Settings /wp-admin/admin.php?page=wta_wp_to_android_plugin_settings1,0882.0628.2428.05
bubble_chart Navigation Header /wp-admin/admin.php?page=wta_wp_to_android_plugin_headernav_settings9261.9328.7228.22
android Generate APK /wp-admin/admin.php?page=wta_wp_to_android_plugin_generate_settings9822.1033.6927.79

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_deregister_script was called incorrectly. Do not deregister the jquery script in the administration area. To target the front-end theme, use the wp_enqueue_scripts hook. Please see Debugging in WordPress for more information. (This message was added in version 3.6.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wta_wp_to_android_plugin_generate_settings
    • > User notice in wp-includes/functions.php+5905
    Function wp_deregister_script was called incorrectly. Do not deregister the jquery script in the administration area. To target the front-end theme, use the wp_enqueue_scripts hook. Please see Debugging in WordPress for more information. (This message was added in version 3.6.0.)

SRP 50% 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
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wptoandroid/wta-wp-to-android-plugin-admin-aboutus-settings.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 72 tag instead of maximum 10
Please take inspiration from this readme.txt

wptoandroid/plugin.php 85% from 13 tests

This is the main PHP file of "WordPress To Android Plugin" version 2.0-beta12..., providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("wptoandroid.php" instead of "plugin.php")
  • Version: Use only periods and digits for the version number (ex. "1.0.3" instead of "2.0-beta12...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin16,623 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP231,4411,9167,582
CSS69375,3066,625
JavaScript4551,7282,284
HTML144113
SVG10019

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity78.92
▷ Minimum class complexity2.00
▷ Maximum class complexity295.00
Average method complexity5.44
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes17.69%
▷ Concrete classes1292.31%
▷ Final classes00.00%
Methods228
▷ Static methods00.00%
▷ Public methods17576.75%
▷ Protected methods5222.81%
▷ Private methods10.44%
Functions48
▷ Named functions48100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/ios-status-bar.png8.06KB4.00KB▼ 50.42%