78% interactive-map-of-florida

Code Review | Interactive Regional Map of Florida

WordPress plugin Interactive Regional Map of Florida scored 78% from 54 tests.

About plugin

  • Plugin page: interactive-map-o...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.2
  • WordPress version: 6.3.1
  • First release: Oct 14, 2017
  • Latest release: Apr 3, 2023
  • Number of updates: 22
  • Update frequency: every 90.9 days
  • Top authors: clickmaps (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,058 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.70ms] Passed 4 tests

This is a short check of server-side resources used by Interactive Regional Map of Florida
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0445.26 ▲3.78
Dashboard /wp-admin3.35 ▲0.0446.91 ▼3.90
Posts /wp-admin/edit.php3.40 ▲0.0450.24 ▲0.75
Add New Post /wp-admin/post-new.php5.93 ▲0.0496.57 ▼3.72
Media Library /wp-admin/upload.php3.27 ▲0.0436.78 ▲0.06

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Interactive Regional Map of Florida
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲8413.64 ▼0.761.72 ▲0.0639.42 ▼0.15
Dashboard /wp-admin2,226 ▲415.83 ▲0.93106.72 ▲5.8368.42 ▲26.62
Posts /wp-admin/edit.php2,106 ▲171.99 ▲0.0037.40 ▼2.6032.67 ▼4.67
Add New Post /wp-admin/post-new.php1,538 ▲323.04 ▼0.29695.28 ▲26.1960.57 ▲3.61
Media Library /wp-admin/upload.php1,408 ▲174.10 ▼0.1095.21 ▼17.8775.72 ▲29.66

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 were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/interactive-map-of-florida/design/map.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/interactive-map-of-florida/flr-map.php:81
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/interactive-map-of-florida/design/admin.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/interactive-map-of-florida/config.php: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 96% 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: florida maps, florida map, interactive florida map plugins, florida map template, interactive florida map...

interactive-map-of-florida/flr-map.php 92% from 13 tests

The main file in "Interactive Regional Map of Florida" v. 1.0 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:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("interactive-map-of-florida.php" instead of "flr-map.php")

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
There were no executable files found in this plugin1,716 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript50713761
PHP4278421
CSS8203401
SVG200125
HTML1008

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods990.00%
▷ Protected methods110.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icons.png15.88KB5.44KB▼ 65.72%
images/map-icons.png3.93KB2.40KB▼ 38.85%
images/map-icon.png1.27KB0.47KB▼ 63.15%
images/florida-premium.png14.01KB12.94KB▼ 7.67%