90% os-datahub-maps

Code Review | OS DataHub Maps

WordPress plugin OS DataHub Maps scored90%from 54 tests.

About plugin

  • Plugin page: os-datahub-maps
  • Plugin version: 1.7.1
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.4
  • WordPress version: 6.3.1
  • First release: Sep 7, 2020
  • Latest release: Nov 13, 2023
  • Number of updates: 70
  • Update frequency: every 16.7 days
  • Top authors: skirridsystems (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

200+ active /5,857 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼9.09ms] Passed 4 tests

Server-side resources used by OS DataHub Maps
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1537.74 ▼4.99
Dashboard /wp-admin3.44 ▲0.0949.52 ▼16.81
Posts /wp-admin/edit.php3.55 ▲0.1950.76 ▲6.31
Add New Post /wp-admin/post-new.php6.02 ▲0.1384.85 ▼17.84
Media Library /wp-admin/upload.php3.36 ▲0.1337.88 ▲3.29
OS Maps /wp-admin/options-general.php?page=os-datahub-maps3.3332.26

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 129 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for OS DataHub Maps
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,874 ▲8714.73 ▲0.661.84 ▼0.1442.22 ▼2.02
Dashboard /wp-admin2,218 ▲375.80 ▲0.1192.09 ▼16.9338.14 ▼0.62
Posts /wp-admin/edit.php2,128 ▲282.44 ▲0.4839.44 ▲6.4733.31 ▼3.18
Add New Post /wp-admin/post-new.php1,543 ▲1723.64 ▲0.36659.53 ▼34.0634.96 ▼22.29
Media Library /wp-admin/upload.php1,426 ▲324.53 ▲0.3098.37 ▼4.0042.03 ▲1.08
OS Maps /wp-admin/options-general.php?page=os-datahub-maps1,5682.5851.4832.19

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

os-datahub-maps/os-datahub-maps.php Passed 13 tests

"OS DataHub Maps" version 1.7.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
58 characters long description:
Plugin for displaying OS Maps using the Data Hub Maps API.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin2,791 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP41763531,129
CSS6167411,054
JavaScript122694585
SVG100023

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.35
Average class complexity44.25
▷ Minimum class complexity2.00
▷ Maximum class complexity69.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods81
▷ Static methods00.00%
▷ Public methods6074.07%
▷ Protected methods00.00%
▷ Private methods2125.93%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants5
▷ Global constants120.00%
▷ Class constants480.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
81 compressed PNG files occupy 0.08MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/letter_m.png0.33KB0.36KB0.00%
css/images/marker-icon-2x.png2.41KB2.52KB0.00%
css/images/marker-icon-green.png1.78KB1.58KB▼ 11.42%
css/images/marker-icon-2x-grey.png3.45KB2.47KB▼ 28.41%
css/images/marker-icon-yellow.png1.82KB1.56KB▼ 14.02%