83% wp-flexible-map-options

Code Review | WP Flexible Map Options

WordPress plugin WP Flexible Map Options scored83%from 54 tests.

About plugin

  • Plugin page: wp-flexible-map-o...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-3.9
  • WordPress version: 6.3.1
  • First release: Dec 30, 2013
  • Latest release: Apr 26, 2014
  • Number of updates: 12
  • Update frequency: every 9.8 days
  • Top authors: kerli81 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /4,268 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.25ms] Passed 4 tests

Server-side resources used by WP Flexible Map Options
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.19 ▼2.21
Dashboard /wp-admin3.32 ▲0.0244.43 ▼11.90
Posts /wp-admin/edit.php3.37 ▲0.0248.74 ▲5.23
Add New Post /wp-admin/post-new.php5.90 ▲0.02101.18 ▲1.05
Media Library /wp-admin/upload.php3.24 ▲0.0235.42 ▲4.06

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
flexible-map-options-status
db_upgraded
widget_recent-posts
flexible-map-options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Flexible Map Options
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.171.85 ▲0.0744.17 ▲2.09
Dashboard /wp-admin2,209 ▲184.86 ▼1.0298.05 ▼6.4939.99 ▼5.28
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0040.39 ▼0.6334.82 ▼0.78
Add New Post /wp-admin/post-new.php1,542 ▲1318.08 ▼4.99616.15 ▲6.1558.18 ▲8.09
Media Library /wp-admin/upload.php1,382 ▼94.23 ▼0.12107.20 ▲0.3546.63 ▲1.25

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
  • This plugin does not fully uninstall, leaving 8 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • flexible-map-options
    • widget_recent-posts
    • widget_theysaidso_widget
    • flexible-map-options-status

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Please fix the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to a member function getAllFields() on null in wp-content/plugins/wp-flexible-map-options/page.optionpage.php:43
    • > PHP Notice
      Undefined variable: optionInstance in wp-content/plugins/wp-flexible-map-options/page.optionpage.php on line 43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wp-flexible-map-options/flexible-map-options.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% 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
These attributes need your attention:
  • Donate link: Invalid url: ""
Please take inspiration from this readme.txt

wp-flexible-map-options/flexible-map-options.php 85% from 13 tests

The main PHP file in "WP Flexible Map Options" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-flexible-map-options.php" instead of "flexible-map-options.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected488 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP675158302
PO File26868186

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity3.75
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.41
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods2488.89%
▷ Protected methods00.00%
▷ Private methods311.11%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants571.43%
▷ Class constants228.57%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected