84% frenchmap

Code Review | FrenchMap

WordPress plugin FrenchMap scored84%from 54 tests.

About plugin

  • Plugin page: frenchmap
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 26, 2023
  • Latest release: Nov 10, 2023
  • Number of updates: 3
  • Update frequency: every 96.0 days
  • Top authors: idnich (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /259 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
Install script ran successfully

Server metrics [RAM: ▼0.10MB] [CPU: ▼15.81ms] Passed 4 tests

This is a short check of server-side resources used by FrenchMap
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1138.11 ▼2.23
Dashboard /wp-admin3.20 ▼0.1529.74 ▼25.34
Posts /wp-admin/edit.php3.34 ▼0.0232.83 ▼13.38
Add New Post /wp-admin/post-new.php5.58 ▼0.3170.14 ▼13.77
Media Library /wp-admin/upload.php3.29 ▲0.0626.14 ▼10.73

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 35 new options
New WordPress options
languedoc-roussillon
martinique
corse
lorraine
champagne-ardenne
theysaidso_admin_options
reunion
franche-comte
limousin
picardie
...

Browser metrics Passed 4 tests

Checking browser requirements for FrenchMap
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲13314.42 ▲0.181.89 ▲0.1644.26 ▲2.86
Dashboard /wp-admin2,282 ▲1045.81 ▲0.1485.99 ▼19.1337.55 ▼4.01
Posts /wp-admin/edit.php2,195 ▲922.31 ▲0.3736.72 ▼6.1932.00 ▼6.92
Add New Post /wp-admin/post-new.php1,562 ▲3323.39 ▲0.24661.69 ▲67.9635.41 ▼24.74
Media Library /wp-admin/upload.php1,493 ▲934.45 ▲0.27100.17 ▼8.0543.82 ▲0.53

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/frenchmap/frenchmap.php:71

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: carte, france, carte de france, carte interactive, carte des dpartements franais...

frenchmap/frenchmap.php Passed 13 tests

The main PHP script in "FrenchMap" version 1.0.1 is automatically included on every request by WordPress
91 characters long description:
FrenchMap vous permet d'afficher facilement et rapidement une carte interactive de France !

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
Success! There were no dangerous files found in this plugin714 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3368547
CSS1183163
JavaScript1003
SVG1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods220.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.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.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/frenchmap_logo.png16.46KB5.67KB▼ 65.54%