78% laposte-hexasmal

Code Review | La Poste : communes par codes postaux

WordPress plugin La Poste : communes par codes postaux scored78%from 54 tests.

About plugin

  • Plugin page: laposte-hexasmal
  • Plugin version: 1.4.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Oct 15, 2018
  • Latest release: Oct 25, 2023
  • Number of updates: 15
  • Update frequency: every 122.6 days
  • Top authors: Malaiac (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,733 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.58ms] Passed 4 tests

Server-side resources used by La Poste : communes par codes postaux
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.32 ▲5.64
Dashboard /wp-admin3.36 ▲0.0249.18 ▼13.20
Posts /wp-admin/edit.php3.42 ▲0.0645.35 ▲0.75
Add New Post /wp-admin/post-new.php5.95 ▲0.0680.42 ▼4.73
Media Library /wp-admin/upload.php3.29 ▲0.0635.91 ▼1.14

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by La Poste : communes par codes postaux
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.25 ▼0.111.79 ▲0.2445.55 ▲5.02
Dashboard /wp-admin2,202 ▲225.63 ▼0.0193.81 ▲7.2641.62 ▲3.24
Posts /wp-admin/edit.php2,104 ▲41.97 ▼0.0333.75 ▼2.0033.73 ▼0.41
Add New Post /wp-admin/post-new.php1,531 ▲523.02 ▼0.64642.91 ▼57.9548.59 ▼8.97
Media Library /wp-admin/upload.php1,404 ▲14.20 ▲0.0497.72 ▼23.0344.01 ▼10.46
Codes Postaux /wp-admin/hexasmal_cp.php260.420.0913.12

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% 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
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/laposte-hexasmal/hexasmal-shortcodes.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/laposte-hexasmal/hexasmal-admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/laposte-hexasmal/hexasmal_codes_postaux.php:25

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/hexasmal_cp.php
    • > Network (severe)
    wp-admin/hexasmal_cp.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: la poste, communes, woocommerce, adresse, code postal...

laposte-hexasmal/hexasmal_codes_postaux.php 77% from 13 tests

The entry point to "La Poste : communes par codes postaux" version 1.4.4.2 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("laposte-hexasmal.php" instead of "hexasmal_codes_postaux.php")
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Requires at least: The required version number must match the one declared in readme.txt ("2.7" instead of "4.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected580 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP5159151580

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions18
▷ Named functions1055.56%
▷ Anonymous functions844.44%
Constants6
▷ Global constants6100.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
There were not PNG files found in your plugin