88% mfloormap

Code Review | mFloorMap

WordPress plugin mFloorMap scored 88% from 54 tests.

About plugin

  • Plugin page: mfloormap
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-5.2.4
  • WordPress version: 5.8.1
  • First release: Mar 20, 2019
  • Latest release: Oct 30, 2019
  • Number of updates: 6
  • Update frequency: every 37.5 days
  • Top authors: tekod (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 497 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.00MB] [CPU: ▼153.08ms] Passed 4 tests

Server-side resources used by mFloorMap
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.0035.19 ▲2.91
Dashboard /wp-admin3.06 ▲0.0039.12 ▼5.00
Posts /wp-admin/edit.php3.11 ▲0.0044.11 ▼1.72
Add New Post /wp-admin/post-new.php5.42 ▼0.0285.41 ▼605.51
Media Library /wp-admin/upload.php3.00 ▲0.0035.27 ▼0.07

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 33 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for mFloorMap
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,677 ▲8115.87 ▼0.129.74 ▲1.6049.83 ▼0.64
Dashboard /wp-admin2,992 ▲585.97 ▲0.06132.98 ▼16.43111.76 ▼7.89
Posts /wp-admin/edit.php2,739 ▼02.71 ▲0.0064.95 ▼1.3390.82 ▼3.84
Add New Post /wp-admin/post-new.php1,498 ▼18518.79 ▲0.12370.30 ▼5.38103.63 ▼8.22
Media Library /wp-admin/upload.php1,807 ▼05.03 ▼0.01143.15 ▼22.69114.10 ▼11.81

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

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/mfloormap/mfloormap.php
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'mFloorMap_Admin_BaseManager' not found in wp-content/plugins/mfloormap/Admin/PlaceManager.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'mFloorMap_Admin_BaseManager' not found in wp-content/plugins/mfloormap/Admin/FloorManager.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/mfloormap/Admin/BaseManager.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/mfloormap/Public/Shortcode/Floor/template.php:5
    • > PHP Notice
      Undefined variable: BackLink in wp-content/plugins/mfloormap/Public/Shortcode/Place/template.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'mFloorMap_Admin_BaseManager' not found in wp-content/plugins/mfloormap/Admin/FacilityManager.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/mfloormap/Public/Shortcode/Facility/template.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/mfloormap/Public/Shortcode/Place/template.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'mFloorMap_Admin_BaseManager' not found in wp-content/plugins/mfloormap/Admin/TagManager.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
The official readme.txt might help

mfloormap/mfloormap.php 85% from 13 tests

"mFloorMap" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("/Lang")
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected5,309 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript57501,2543,123
PHP187056331,917
CSS21910150
PO File1542116
Bourne Shell1003

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity17.46
▷ Minimum class complexity2.00
▷ Maximum class complexity81.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods126
▷ Static methods1310.32%
▷ Public methods5846.03%
▷ Protected methods6652.38%
▷ Private methods21.59%
Functions0
▷ Named functions00.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.08MB with 0.05MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
mfloormap_logo.png55.69KB18.40KB▼ 66.95%
Public/Image/empty-logo.png4.21KB1.75KB▼ 58.39%
Public/CSS/sprites.png20.25KB10.19KB▼ 49.68%