84% wemap

Code Review | wemap

WordPress plugin wemap scored84%from 54 tests.

About plugin

  • Plugin page: wemap
  • Plugin version: 0.9.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.1-5.9
  • WordPress version: 6.3.1
  • First release: Oct 14, 2015
  • Latest release: Feb 18, 2022
  • Number of updates: 52
  • Update frequency: every 44.6 days
  • Top authors: Pierre_Wemap (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,430 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.75ms] Passed 4 tests

This is a short check of server-side resources used by wemap
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0649.85 ▲2.15
Dashboard /wp-admin3.36 ▲0.0547.93 ▼10.24
Posts /wp-admin/edit.php3.47 ▲0.1143.10 ▼9.92
Add New Post /wp-admin/post-new.php5.94 ▲0.05101.25 ▲0.15
Media Library /wp-admin/upload.php3.28 ▲0.0536.15 ▲1.00
Wemap Plugin /wp-admin/admin.php?page=wemap3.2434.15
Log in /wp-admin/admin.php?page=wemap_connexion3.2431.38

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

wemap: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲3414.38 ▼0.231.89 ▼0.0739.87 ▼0.04
Dashboard /wp-admin2,223 ▲465.55 ▼0.0988.24 ▲0.2381.75 ▲40.72
Posts /wp-admin/edit.php2,131 ▲281.98 ▼0.0135.25 ▼3.3333.16 ▼2.28
Add New Post /wp-admin/post-new.php6,388 ▲4,86227.87 ▲4.60910.71 ▲266.6139.51 ▼25.50
Media Library /wp-admin/upload.php1,422 ▲224.17 ▲0.00120.26 ▲12.8166.06 ▲18.64
Wemap Plugin /wp-admin/admin.php?page=wemap8272.1124.0726.36
Log in /wp-admin/admin.php?page=wemap_connexion8331.9729.5832.06

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant WEMAP_API_URL - assumed 'WEMAP_API_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wemap/class/partials/pinpoints.php on line 3
    • > PHP Warning
      Use of undefined constant WEMAP_LIVEMAP_URL - assumed 'WEMAP_LIVEMAP_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wemap/class/partials/pinpoints.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'Admin_Wemap_Meta_Box' not found in wp-content/plugins/wemap/class/partials/pinpoints.php:25
    • > PHP Notice
      Undefined index: user_id in wp-content/plugins/wemap/class/partials/pinpoints.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wemap/wemap.php:23

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 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wemap === )
The official readme.txt is a good inspiration

wemap/wemap.php Passed 13 tests

"wemap" version 0.9.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
12 characters long description:
Plugin wemap

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
Good job! No executable or dangerous file extensions detected626 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP84925434
JavaScript32312131
CSS27044
JSON10017

PHP code Passed 2 tests

An overview 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.16
Average class complexity4.20
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.64
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods25
▷ Static methods520.00%
▷ Public methods2496.00%
▷ Protected methods00.00%
▷ Private methods14.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
5 PNG files occupy 0.29MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/tuto_site3.png169.58KB57.66KB▼ 66.00%
images/icon_circle_maaap.png4.62KB2.39KB▼ 48.39%
images/w_wemap.png1.08KB0.22KB▼ 79.93%
images/tuto_site2.png17.26KB6.65KB▼ 61.49%
images/tuto_site1.png106.76KB30.03KB▼ 71.88%