10% mobigatevn

Code Review | Mobigate

WordPress plugin Mobigate scored 10% from 54 tests.

About plugin

  • Plugin page: mobigatevn
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9
  • WordPress version: 5.8.1
  • First release: Jun 18, 2014
  • Latest release: Jun 18, 2014
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: cloudvn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 781 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/mobigatevn/admin/includes/game-list-table.php+119
    Declaration of Game_List_Table::prepare_items($data_source) should be compatible with WP_List_Table::prepare_items()

Server metrics [RAM: ▼1.75MB] [CPU: ▼227.88ms] Passed 4 tests

A check of server-side resources used by Mobigate
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1539.57 ▲13.02
Dashboard /wp-admin1.90 ▼1.1611.62 ▼44.35
Posts /wp-admin/edit.php1.90 ▼1.216.97 ▼43.14
Add New Post /wp-admin/post-new.php1.90 ▼3.535.80 ▼795.44
Media Library /wp-admin/upload.php1.90 ▼1.106.01 ▼28.60
Mobigate /wp-admin/admin.php?page=mobigate1.905.64
Games /wp-admin/admin.php?page=list_of_game1.906.62
Select categry /wp-admin/admin.php?page=select_category_for_game1.9010.13

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 34 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Mobigate: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,851 ▲27916.20 ▲0.5016.22 ▲6.1547.45 ▼5.16
Dashboard /wp-admin3,001 ▲655.95 ▼0.03156.10 ▼16.75120.50 ▼3.36
Posts /wp-admin/edit.php2,778 ▲422.71 ▼0.0163.41 ▼3.6893.83 ▼0.96
Add New Post /wp-admin/post-new.php1,710 ▲2718.80 ▲0.03420.29 ▲5.15119.51 ▲0.44
Media Library /wp-admin/upload.php1,845 ▲385.05 ▲0.04162.31 ▼1.96123.86 ▼0.66
Mobigate /wp-admin/admin.php?page=mobigate1,0802.5259.3577.15
Games /wp-admin/admin.php?page=list_of_game1,2702.1359.7185.88
Select categry /wp-admin/admin.php?page=select_category_for_game1,0792.0958.4093.75

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/mobigatevn/admin/includes/game-list-table.php+119
    Declaration of Game_List_Table::prepare_items($data_source) should be compatible with WP_List_Table::prepare_items()

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=select_category_for_game
    • > Warning in wp-content/plugins/mobigatevn/admin/includes/game-list-table.php+119
    Declaration of Game_List_Table::prepare_items($data_source) should be compatible with WP_List_Table::prepare_items()
    • > GET request to /wp-admin/admin.php?page=list_of_game
    • > Warning in wp-content/plugins/mobigatevn/admin/includes/game-list-table.php+124
    usort() expects parameter 1 to be array, bool given
    • > GET request to /wp-admin/admin.php?page=list_of_game
    • > Warning in wp-content/plugins/mobigatevn/admin/includes/game-list-table.php+128
    count(): Parameter must be an array or an object that implements Countable
    • > GET request to /wp-admin/admin.php?page=list_of_game
    • > Warning in wp-content/plugins/mobigatevn/admin/includes/game-list-table.php+131
    array_slice() expects parameter 1 to be array, bool given
    • > GET request to /wp-admin/admin.php?page=select_category_for_game
    • > Notice in wp-content/plugins/mobigatevn/admin/views/category.php+12
    Undefined index: requestId
    • > GET request to /wp-admin/admin.php?page=select_category_for_game
    • > Notice in wp-content/plugins/mobigatevn/admin/views/category.php+14
    Undefined index: action

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/mobigatevn/public/views/public.php
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/mobigatevn/admin/views/category.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/mobigatevn/admin/views/admin.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/mobigatevn/admin/views/games.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/mobigatevn/admin/includes/game-list-table.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mobigatevn/admin/includes/wp-flash-message.php:5
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mobigatevn/admin/includes/game-list-table.php on line 7
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/mobigatevn/admin/includes/game-list-table.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: spam, comments

mobigatevn/mobigate.php 92% from 13 tests

The main PHP file in "Mobigate" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("mobigatevn.php" instead of "mobigate.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin748 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP13208442691
CSS28245
JavaScript28210
Markdown1002

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity12.00
▷ Minimum class complexity5.00
▷ Maximum class complexity26.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods53
▷ Static methods1426.42%
▷ Public methods4584.91%
▷ Protected methods00.00%
▷ Private methods815.09%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/download.png2.84KB0.14KB▼ 95.11%
public/assets/css/download.png2.84KB0.14KB▼ 95.11%