88% hanu-droid

Code Review | Hanu-Droid

WordPress plugin Hanu-Droid scored 88% from 54 tests.

About plugin

  • Plugin page: hanu-droid
  • Plugin version: 2.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.1
  • WordPress version: 5.8.1
  • First release: Sep 18, 2012
  • Latest release: Mar 8, 2019
  • Number of updates: 31
  • Update frequency: every 76.3 days
  • Top authors: mastram (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,157 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼144.00ms] Passed 4 tests

Analyzing server-side resources used by Hanu-Droid
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1338.06 ▲17.68
Dashboard /wp-admin3.07 ▲0.0247.37 ▼0.24
Posts /wp-admin/edit.php3.13 ▲0.0245.42 ▼1.31
Add New Post /wp-admin/post-new.php5.43 ▼0.0088.76 ▼567.38
Media Library /wp-admin/upload.php3.02 ▲0.0235.23 ▼7.05
Hanu-Droid Settings /wp-admin/options-general.php?page=SendGCM2.9929.74

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 4 new options
New WordPress options
HanuDroid_Tags
HanuDroid_Version
HanuDroid_MaxPost
HanuDroid_Categories

Browser metrics Passed 4 tests

An overview of browser requirements for Hanu-Droid
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11215.92 ▲0.379.23 ▲0.5147.89 ▼8.61
Dashboard /wp-admin2,978 ▲475.84 ▼0.09145.41 ▲3.60105.40 ▼2.07
Posts /wp-admin/edit.php2,744 ▲52.71 ▼0.0162.75 ▼3.0687.26 ▼0.47
Add New Post /wp-admin/post-new.php1,686 ▼1,85218.61 ▲3.91408.38 ▼59.34110.75 ▼5.03
Media Library /wp-admin/upload.php1,812 ▲55.02 ▲0.02161.90 ▲3.33113.33 ▼13.51
Hanu-Droid Settings /wp-admin/options-general.php?page=SendGCM9952.0957.0378.04

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 5× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/hanu-droid/FetchPosts.php
    • > /wp-content/plugins/hanu-droid/FetchPostMeta.php
    • > /wp-content/plugins/hanu-droid/UpdatePostRating.php
    • > /wp-content/plugins/hanu-droid/PostArtifacts.php
    • > /wp-content/plugins/hanu-droid/GetLatestDataTimeStamp.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      require_once(): Failed opening required 'Post-Utility/jokes_utility_functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/hanu-droid/NewPost.php on line 20
    • > PHP Fatal error
      require_once(): Failed opening required 'Post-Utility/jokes_utility_functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/hanu-droid/CreateNewPost.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/hanu-droid/hanudroid.php:12

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

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: native mobile app, android, hanu-droid

hanu-droid/hanudroid.php 92% from 13 tests

The principal PHP file in "Hanu-Droid" v. 2.8 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("hanu-droid.php" instead of "hanudroid.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
Everything looks great! No dangerous files found in this plugin684 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP8293170684

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin