84% widget-offres-demploi-pole-emploi

Code Review | Widget Offres

WordPress plugin Widget Offres scored84%from 54 tests.

About plugin

  • Plugin page: widget-offres-dem...
  • Plugin version: 0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.2
  • WordPress version: 6.3.1
  • First release: Sep 6, 2022
  • Latest release: Apr 26, 2023
  • Number of updates: 10
  • Update frequency: every 23.2 days
  • Top authors: teampoleemploiio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /462 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

Analyzing server-side resources used by Widget Offres
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.45 ▲0.81
Dashboard /wp-admin3.35 ▲0.0549.00 ▼1.02
Posts /wp-admin/edit.php3.40 ▲0.0549.02 ▼3.89
Add New Post /wp-admin/post-new.php5.93 ▲0.0594.77 ▼10.66
Media Library /wp-admin/upload.php3.28 ▲0.0537.95 ▲1.98
Widget Offres /wp-admin/tools.php?page=widgetOffresParams3.2434.56

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Widget Offres
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.74 ▲0.471.75 ▼0.1145.48 ▼5.27
Dashboard /wp-admin2,199 ▲195.57 ▼0.0689.58 ▲0.4541.04 ▼2.43
Posts /wp-admin/edit.php2,101 ▲11.97 ▼0.0440.46 ▼0.6535.87 ▼1.45
Add New Post /wp-admin/post-new.php1,529 ▲323.57 ▲0.58660.48 ▼11.7270.06 ▲19.97
Media Library /wp-admin/upload.php1,407 ▲74.17 ▼0.1196.94 ▼8.5943.76 ▼2.00
Widget Offres /wp-admin/tools.php?page=widgetOffresParams1,6731.7828.64136.26

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
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/widget-offres-demploi-pole-emploi/widget-offres.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: offres emploi, pole emploi, widget

widget-offres-demploi-pole-emploi/widget-offres.php 85% from 13 tests

The main file in "Widget Offres" v. 0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("widget-offres-demploi-pole-emploi.php" instead of "widget-offres.php")
  • Description: The description should be shorter than 140 characters (currently 163 characters long)

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
There were no executable files found in this plugin2,195 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
CSS1201,702
PHP112121493

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.07
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
logo.png12.28KB4.66KB▼ 62.10%