84% wp-mapa-politico-spain

Code Review | WP Mapa Politico España

WordPress plugin WP Mapa Politico España scored84%from 54 tests.

About plugin

  • Plugin page: wp-mapa-politico-...
  • Plugin version: 3.7.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: Apr 10, 2014
  • Latest release: Mar 31, 2023
  • Number of updates: 100
  • Update frequency: every 32.8 days
  • Top authors: jcglp (100%)

Code review

54 tests

User reviews

26 reviews

Install metrics

600+ active /13,391 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.35MB] [CPU: ▼4.76ms] Passed 4 tests

Analyzing server-side resources used by WP Mapa Politico España
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.3443.00 ▲2.51
Dashboard /wp-admin3.65 ▲0.3449.32 ▼1.53
Posts /wp-admin/edit.php3.76 ▲0.4047.23 ▼0.96
Add New Post /wp-admin/post-new.php6.25 ▲0.3695.19 ▼7.70
Media Library /wp-admin/upload.php3.57 ▲0.3435.91 ▼8.86
WP Mapa Politico /wp-admin/options-general.php?page=wpmps_settings3.5433.97

Server storage [IO: ▲1.38MB] [DB: ▲0.03MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 28 new files
Database: no new tables, 16 new options
New WordPress options
wpmps_background_provincia_color
widget_recent-comments
wpmps_plugin_mapas
wpmps_version
wpmps_hover_provincia_color
theysaidso_admin_options
wpmps_background_color
wpmps_border_color
widget_theysaidso_widget
widget_recent-posts
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Mapa Politico España
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.35 ▲0.081.63 ▼0.0344.75 ▲5.06
Dashboard /wp-admin2,203 ▲235.65 ▼0.0288.15 ▲0.3341.92 ▼2.06
Posts /wp-admin/edit.php2,105 ▲82.02 ▼0.0035.56 ▼2.8731.57 ▼1.88
Add New Post /wp-admin/post-new.php1,533 ▼14623.60 ▲1.80635.50 ▼34.4156.67 ▲5.47
Media Library /wp-admin/upload.php1,408 ▲114.42 ▲0.2595.48 ▼9.7343.55 ▼1.04
WP Mapa Politico /wp-admin/options-general.php?page=wpmps_settings9211.7231.0133.75

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-mapa-politico-spain/wp-mapa-politico.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-mapa-politico-spain/includes/shortcodes.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: map, plugin, spain, svg, image...

wp-mapa-politico-spain/wp-mapa-politico.php 92% from 13 tests

"WP Mapa Politico España" version 3.7.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-mapa-politico-spain.php" instead of "wp-mapa-politico.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin2,386 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP83513111,233
SVG21484987
PO File14455121
JavaScript45120
Markdown17013
CSS20012

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.27
Average class complexity22.50
▷ Minimum class complexity2.00
▷ Maximum class complexity46.00
Average method complexity4.07
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods28
▷ Static methods414.29%
▷ Public methods2692.86%
▷ Protected methods00.00%
▷ Private methods27.14%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.41MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png109.50KB35.40KB▼ 67.67%
assets/icon-128x128.png8.32KB3.71KB▼ 55.38%
assets/screenshot-2.png128.63KB52.90KB▼ 58.87%
assets/screenshot-1.png43.60KB19.68KB▼ 54.87%
assets/banner-772x250.png130.33KB48.76KB▼ 62.59%