88% tracker-wp

Code Review | Tracker wp

WordPress plugin Tracker wp scored 88% from 54 tests.

About plugin

  • Plugin page: tracker-wp
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.2-5.4.2
  • WordPress version: 5.9.2
  • First release: Aug 24, 2020
  • Latest release: Aug 25, 2020
  • Number of updates: 16
  • Update frequency: every 0.1 days
  • Top authors: allcodewp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 221 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.24MB] [CPU: ▼298.65ms] Passed 4 tests

Analyzing server-side resources used by Tracker wp
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3155.11 ▲1.68
Dashboard /wp-admin3.68 ▲0.2735.90 ▲2.15
Posts /wp-admin/edit.php3.90 ▲0.2638.81 ▲2.21
Add New Post /wp-admin/post-new.php7.13 ▲0.1697.34 ▼1,199.98
Media Library /wp-admin/upload.php3.56 ▲0.2725.84 ▲1.55
Configuracion /wp-admin/admin.php?page=tracker-wp/configuracion/apikey.php3.5324.52
Tracker wp /wp-admin/admin.php?page=tracker-wp/configuracion/welcome.php3.5324.62

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 63 new files
Database: 4 new tables, no new options
New tables
wp_tkwp_configuration
wp_tkwp_posiciones
wp_tkwp_multimedias
wp_tkwp_maps

Browser metrics Passed 4 tests

Tracker wp: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,862 ▲11816.63 ▲0.6816.00 ▲9.822.92 ▲0.56
Dashboard /wp-admin2,935 ▲816.01 ▼0.18118.65 ▼15.73155.78 ▼6.76
Posts /wp-admin/edit.php2,728 ▲373.25 ▲0.0263.77 ▼0.41141.82 ▲1.94
Add New Post /wp-admin/post-new.php1,690 ▼3518.43 ▲1.38388.06 ▼94.83159.16 ▲3.02
Media Library /wp-admin/upload.php1,739 ▲415.55 ▲0.02137.69 ▼4.06178.52 ▼7.38
Configuracion /wp-admin/admin.php?page=tracker-wp/configuracion/apikey.php1,0432.4256.77108.83
Tracker wp /wp-admin/admin.php?page=tracker-wp/configuracion/welcome.php1,0372.5654.21114.17

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/tracker-wp/configuracion/welcome.php
    • > /wp-content/plugins/tracker-wp/edicion/modals/addMultimedia.php
  • 14× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function submit_button() in wp-content/plugins/tracker-wp/configuracion/permisos.php:43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function tkwp_obtenerPermisosEdicion() in wp-content/plugins/tracker-wp/configuracion/configuracioncomplete.php:3
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/tracker-wp/includes/tkwp_general.php on line 9
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/tracker-wp/edicion/utils/CargadorMapas.php on line 13
    • > PHP Notice
      Undefined index: stc in wp-content/plugins/tracker-wp/edicion/edicionmapas.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/tracker-wp/includes/tkwp_mainFunctions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/tracker-wp/edicion/edicionmapas.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/tracker-wp/includes/tkwp_mainFunctions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/tracker-wp/configuracion/agradecimientos.php:6
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/tracker-wp/edicion/utils/CargadorMapas.php:22

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: ping, position, maps, google, gpx...

tracker-wp/trackerwp.php 77% from 13 tests

The primary PHP file in "Tracker wp" version 1.0.3 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: Please keep the plugin description shorter than 140 characters (currently 159 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("tracker-wp.php" instead of "trackerwp.php")

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
No dangerous file extensions were detected3,718 lines of code in 57 files:
LanguageFilesBlank linesComment linesLines of code
PHP263923122,007
JavaScript9151233825
CSS911240696
HTML1323190

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity10.22
▷ Minimum class complexity1.00
▷ Maximum class complexity45.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods76
▷ Static methods00.00%
▷ Public methods76100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions50
▷ Named functions50100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
visualizacion/img/marcador3.png1.44KB0.62KB▼ 56.72%