10% quae-map

Code Review | Quae Map

WordPress plugin Quae Map scored10%from 54 tests.

About plugin

  • Plugin page: quae-map
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.1.1
  • WordPress version: 6.3.1
  • First release: Mar 31, 2015
  • Latest release: Mar 31, 2015
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: quaelibet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /730 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/quae-map/quae_map.php+30
    Methods with the same name as their class will not be constructors in a future version of PHP; Quae_Map_Widget has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼54.72ms] Passed 4 tests

This is a short check of server-side resources used by Quae Map
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.39 ▼36.42
Dashboard /wp-admin2.10 ▼1.206.56 ▼42.71
Posts /wp-admin/edit.php2.10 ▼1.266.75 ▼48.86
Add New Post /wp-admin/post-new.php2.10 ▼3.798.47 ▼90.88
Media Library /wp-admin/upload.php2.10 ▼1.136.06 ▼30.17

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_quae_map_widget
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Quae Map
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲19214.53 ▲0.1524.98 ▲23.1242.07 ▼3.81
Dashboard /wp-admin2,206 ▲215.84 ▲0.01105.54 ▲0.8641.48 ▼4.23
Posts /wp-admin/edit.php2,089 ▼32.01 ▲0.0139.65 ▼1.2434.95 ▼3.97
Add New Post /wp-admin/post-new.php1,533 ▼1123.17 ▲4.76657.68 ▲18.1062.72 ▲13.75
Media Library /wp-admin/upload.php1,391 ▲34.21 ▼0.03102.13 ▼3.8148.93 ▲7.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/quae-map/quae_map.php+30
    Methods with the same name as their class will not be constructors in a future version of PHP; Quae_Map_Widget has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_quae_map_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% 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
  • 30× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: scaleControl in wp-content/plugins/quae-map/inc/shortcode-frontend.php on line 1
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/quae-map/inc/widget-frontend.php on line 3
    • > PHP Notice
      Undefined variable: zoom in wp-content/plugins/quae-map/inc/widget-frontend.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/quae-map/inc/widget-frontend.php:7
    • > PHP Notice
      Undefined variable: streetViewControl in wp-content/plugins/quae-map/inc/shortcode-frontend.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/quae-map/inc/shortcode-frontend.php:3
    • > PHP Notice
      Undefined variable: zoomControl in wp-content/plugins/quae-map/inc/shortcode-frontend.php on line 1
    • > PHP Notice
      Undefined variable: scaleControl in wp-content/plugins/quae-map/inc/widget-frontend.php on line 5
    • > PHP Notice
      Undefined variable: before_widget in wp-content/plugins/quae-map/inc/widget-frontend.php on line 2
    • > PHP Notice
      Undefined variable: height in wp-content/plugins/quae-map/inc/shortcode-frontend.php on line 1

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: google map, google maps api v3, geocoding, maps, google maps plugin...

quae-map/quae_map.php 85% from 13 tests

The principal PHP file in "Quae Map" v. 1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("quae-map.php" instead of "quae_map.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected361 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP42617175
PO File2222281
JavaScript13373
CSS17032

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity5.25
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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
4 compressed PNG files occupy 0.14MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png31.77KB30.70KB▼ 3.39%
assets/screenshot-4.png72.48KB71.89KB▼ 0.82%
assets/screenshot-1.png18.33KB17.77KB▼ 3.07%
assets/screenshot-3.png18.61KB17.66KB▼ 5.09%