83% bima-fonctions

Code Review | Bima Fonctions

WordPress plugin Bima Fonctions scored83%from 54 tests.

About plugin

  • Plugin page: bima-fonctions
  • Plugin version: 0.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.3
  • WordPress version: 6.3.1
  • First release: Jun 22, 2022
  • Latest release: Aug 13, 2023
  • Number of updates: 22
  • Update frequency: every 19.1 days
  • Top authors: patricebima (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /619 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.03MB] [CPU: ▼5.30ms] Passed 4 tests

This is a short check of server-side resources used by Bima Fonctions
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0333.35 ▼7.05
Dashboard /wp-admin3.33 ▲0.0347.78 ▼6.27
Posts /wp-admin/edit.php3.38 ▲0.0349.42 ▲3.46
Add New Post /wp-admin/post-new.php5.91 ▲0.0384.12 ▼10.61
Media Library /wp-admin/upload.php3.25 ▲0.0336.56 ▲2.73
BimaFonctions /wp-admin/options-general.php?page=bima-fonctions-menu3.2229.80

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

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

Browser metrics Passed 4 tests

Bima Fonctions: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4714.48 ▼0.261.79 ▼0.4039.29 ▼11.09
Dashboard /wp-admin2,213 ▲224.84 ▼0.05103.69 ▼13.4240.34 ▼6.42
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0334.87 ▼1.8235.80 ▲2.35
Add New Post /wp-admin/post-new.php1,545 ▲1218.26 ▼4.92616.39 ▼67.9755.37 ▲1.55
Media Library /wp-admin/upload.php1,386 ▲14.22 ▲0.0998.17 ▼3.0643.42 ▼0.06
BimaFonctions /wp-admin/options-general.php?page=bima-fonctions-menu8642.0327.9727.43

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bima-fonctions/bimafonctions.php:17

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 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Page d'options du plugin) image missing
  • Requires php: Invalid plugin version format
You can look at the official readme.txt

bima-fonctions/bimafonctions.php 85% from 13 tests

The main file in "Bima Fonctions" v. 0.3.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bima-fonctions.php" instead of "bimafonctions.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 423 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected461 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
Markdown1800320
PHP13343141

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png68.12KB28.74KB▼ 57.81%