78% interactive-divisional-maps-bangladesh

Code Review | Interactive Divisional Maps Bangladesh

WordPress plugin Interactive Divisional Maps Bangladesh scored78%from 54 tests.

About plugin

  • Plugin page: interactive-divis...
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Mar 2, 2021
  • Latest release: Apr 6, 2023
  • Number of updates: 9
  • Update frequency: every 100.4 days
  • Top authors: imran2w (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /1,399 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.06ms] Passed 4 tests

An overview of server-side resources used by Interactive Divisional Maps Bangladesh
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.50 ▲1.38
Dashboard /wp-admin3.31 ▲0.0144.10 ▼1.85
Posts /wp-admin/edit.php3.36 ▲0.0044.78 ▼0.53
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.10 ▼33.18
Media Library /wp-admin/upload.php3.23 ▲0.0033.52 ▼0.69

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Interactive Divisional Maps Bangladesh
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.42 ▲0.071.71 ▲0.0644.35 ▲4.92
Dashboard /wp-admin2,192 ▲175.60 ▼0.0389.43 ▼19.1341.32 ▼0.61
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0234.26 ▼3.2635.06 ▲0.24
Add New Post /wp-admin/post-new.php1,526 ▼923.30 ▲5.01625.25 ▼51.4260.60 ▼22.07
Media Library /wp-admin/upload.php1,391 ▼94.19 ▼0.0296.63 ▼19.5942.08 ▼11.13

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/interactive-divisional-maps-bangladesh/plugin-main.php
    • > /wp-content/plugins/interactive-divisional-maps-bangladesh/map-image.php
  • 16× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/interactive-divisional-maps-bangladesh/map-image.php on line 1817
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/interactive-divisional-maps-bangladesh/map-image.php on line 996
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/interactive-divisional-maps-bangladesh/map-image.php on line 1497
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/interactive-divisional-maps-bangladesh/map-image.php on line 2032
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/interactive-divisional-maps-bangladesh/map-image.php on line 1331
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/interactive-divisional-maps-bangladesh/map-image.php on line 996
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/interactive-divisional-maps-bangladesh/map-image.php on line 1136
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/interactive-divisional-maps-bangladesh/map-image.php on line 1817
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/interactive-divisional-maps-bangladesh/map-image.php on line 2032
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/interactive-divisional-maps-bangladesh/map-image.php on line 1647

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Interactive Divisional Maps Widget.)
You can look at the official readme.txt

interactive-divisional-maps-bangladesh/plugin-main.php 92% from 13 tests

"Interactive Divisional Maps Bangladesh" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("interactive-divisional-maps-bangladesh.php" instead of "plugin-main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin2,504 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2111362,504

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png55.76KB21.70KB▼ 61.09%