73% usermap

Code Review | User Map

WordPress plugin User Map scored73%from 54 tests.

About plugin

  • Plugin page: usermap
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.0
  • WordPress version: 6.3.1
  • First release: Mar 13, 2014
  • Latest release: May 2, 2015
  • Number of updates: 23
  • Update frequency: every 18.1 days
  • Top authors: dswpsupport (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

30+ active /6,555 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▲2.11ms] Passed 4 tests

This is a short check of server-side resources used by User Map
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0948.85 ▲9.06
Dashboard /wp-admin3.38 ▲0.0849.12 ▼3.16
Posts /wp-admin/edit.php3.44 ▲0.0854.76 ▲7.61
Add New Post /wp-admin/post-new.php5.96 ▲0.0888.58 ▼0.05
Media Library /wp-admin/upload.php3.31 ▲0.0842.42 ▲4.03

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 9 new files
Database: 2 new tables, 6 new options
New tables
wp_useronline
wp_usermap
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for User Map
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲13713.67 ▼0.7313.76 ▲12.1246.33 ▲1.99
Dashboard /wp-admin2,192 ▲185.52 ▼0.1287.50 ▼5.3339.65 ▼3.03
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0133.87 ▼5.5237.90 ▲0.20
Add New Post /wp-admin/post-new.php1,528 ▼022.99 ▲0.05646.12 ▲36.4558.61 ▼0.53
Media Library /wp-admin/upload.php1,400 ▼34.17 ▼0.0396.92 ▼7.5241.60 ▼2.81

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie tables were found after uninstall: 2 tables
    • wp_useronline
    • wp_usermap
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Please fix the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/usermap/userMap.php:21
    • > PHP Fatal error
      Uncaught Error: Call to a member function query() on null in wp-content/plugins/usermap/installScript.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/usermap/default.php:25
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/usermap/installScript.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid url: ""
  • Tags: Too many tags (34 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

usermap/userMap.php 77% from 13 tests

The main file in "User Map" v. 1.2.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 298 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("usermap.php" instead of "userMap.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin696 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP317764618
JavaScript23178

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.21
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

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon_liveevent.png2.24KB1.34KB▼ 39.93%
images/red-dot.png1.31KB1.07KB▼ 18.25%
images/userRegister-icon35x35.png2.07KB1.62KB▼ 22.05%