78% interface-for-android-wp-mobilereader

Code Review | WP MobileReader

WordPress plugin WP MobileReader scored 78% from 54 tests.

About plugin

  • Plugin page: interface-for-and...
  • Plugin version: 2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7
  • WordPress version: 5.8.1
  • First release: Mar 6, 2016
  • Latest release: Apr 9, 2017
  • Number of updates: 16
  • Update frequency: every 25.3 days
  • Top authors: richardkrieger (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 618 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼138.43ms] Passed 4 tests

Analyzing server-side resources used by WP MobileReader
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.94 ▲0.2235.16 ▲14.29
Dashboard /wp-admin3.23 ▲0.1753.69 ▲4.40
Posts /wp-admin/edit.php3.28 ▲0.1649.04 ▼6.85
Add New Post /wp-admin/post-new.php5.52 ▲0.0991.55 ▼547.53
Media Library /wp-admin/upload.php3.11 ▲0.1134.34 ▼3.74
WP MobileReader /wp-admin/options-general.php?page=wp_android_client3.0833.41

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 42 new files
Database: 1 new table, 1 new option
New tables
wp_wpc_prevent_bruteforce
New WordPress options
wpc_publish_datetime_next_update

Browser metrics Passed 4 tests

A check of browser resources used by WP MobileReader
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,685 ▲4815.92 ▼0.149.90 ▼1.3746.46 ▼3.19
Dashboard /wp-admin2,973 ▲365.96 ▼0.02152.45 ▲2.23115.43 ▲16.36
Posts /wp-admin/edit.php2,745 ▲62.73 ▲0.0167.37 ▲0.5286.05 ▲0.09
Add New Post /wp-admin/post-new.php1,620 ▼6321.52 ▲2.76286.96 ▼111.40104.58 ▼4.63
Media Library /wp-admin/upload.php1,754 ▼565.05 ▲0.01159.01 ▲12.98115.98 ▼2.24
WP MobileReader /wp-admin/options-general.php?page=wp_android_client1,2522.4960.7076.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • wpc_publish_datetime_next_update

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/interface-for-android-wp-mobilereader/wp_android_client.php
  • 46× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      require_once(WP_ANDROID_CLIENT_PLUGIN_DIR/classes/class.wpcontract.php): failed to open stream: No such file or directory in wp-content/plugins/interface-for-android-wp-mobilereader/classes/database/class.wptablepbf.php on line 3
    • > PHP Warning
      require_once(WP_ANDROID_CLIENT_PLUGIN_DIR/classes/class.utils.php): failed to open stream: No such file or directory in wp-content/plugins/interface-for-android-wp-mobilereader/classes/cmd/class.wpc_get_posts_own.php on line 3
    • > PHP Warning
      require_once(WP_ANDROID_CLIENT_PLUGIN_DIR/classes/class.utils.php): failed to open stream: No such file or directory in wp-content/plugins/interface-for-android-wp-mobilereader/classes/cmd/class.wpc_get_post_single.php on line 11
    • > PHP Warning
      Use of undefined constant WP_ANDROID_CLIENT_PLUGIN_DIR - assumed 'WP_ANDROID_CLIENT_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/interface-for-android-wp-mobilereader/classes/class.wpandroidclient.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'WP_ANDROID_CLIENT_PLUGIN_DIR/classes/class.utils.php' (include_path='.:/usr/share/php') in wp-content/plugins/interface-for-android-wp-mobilereader/classes/cmd/class.wpc_get_posts_guest.php on line 11
    • > PHP Fatal error
      require_once(): Failed opening required 'WP_ANDROID_CLIENT_PLUGIN_DIR/classes/class.wpcontract.php' (include_path='.:/usr/share/php') in wp-content/plugins/interface-for-android-wp-mobilereader/classes/database/class.wpdatabasemanager.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'WP_ANDROID_CLIENT_PLUGIN_DIR/classes/class.utils.php' (include_path='.:/usr/share/php') in wp-content/plugins/interface-for-android-wp-mobilereader/classes/cmd/class.wpc_get_posts_own.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'WP_ANDROID_CLIENT_PLUGIN_DIR/classes/class.utils.php' (include_path='.:/usr/share/php') in wp-content/plugins/interface-for-android-wp-mobilereader/classes/cmd/class.wpc_update_post_user.php on line 11
    • > PHP Warning
      require_once(WP_ANDROID_CLIENT_PLUGIN_DIR/classes/database/class.wpdatabasemanager.php): failed to open stream: No such file or directory in wp-content/plugins/interface-for-android-wp-mobilereader/classes/class.wpandroidclient.php on line 3
    • > PHP Warning
      Use of undefined constant WP_ANDROID_CLIENT_PLUGIN_DIR - assumed 'WP_ANDROID_CLIENT_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/interface-for-android-wp-mobilereader/classes/cmd/class.wpc_get_posts_user.php on line 11

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: android, reader, smartphone

interface-for-android-wp-mobilereader/wp_android_client.php 92% from 13 tests

The principal PHP file in "WP MobileReader" v. 2.4 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("interface-for-android-wp-mobilereader.php" instead of "wp_android_client.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin23,348 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript43,9433,20219,284
CSS6701282,287
PHP24544801,363
HTML18415414

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity7.04
▷ Minimum class complexity1.00
▷ Maximum class complexity36.00
Average method complexity2.49
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes23
▷ Abstract classes00.00%
▷ Concrete classes23100.00%
▷ Final classes00.00%
Methods98
▷ Static methods2020.41%
▷ Public methods7374.49%
▷ Protected methods00.00%
▷ Private methods2525.51%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
jquery-1.11.4/images/ui-icons_777620_256x240.png4.44KB4.17KB▼ 6.02%
jquery-1.11.4/images/ui-icons_555555_256x240.png6.82KB4.17KB▼ 38.82%
jquery-1.11.4/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
jquery-1.11.4/images/ui-icons_cc0000_256x240.png4.44KB4.17KB▼ 6.02%
jquery-1.11.4/images/ui-icons_777777_256x240.png6.83KB4.17KB▼ 38.92%