10% eco-agenda

Code Review | Eco Agenda

WordPress plugin Eco Agenda scored10%from 54 tests.

About plugin

  • Plugin page: eco-agenda
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9+
  • WordPress version: 6.3.1
  • First release: Jun 24, 2019
  • Latest release: May 9, 2023
  • Number of updates: 21
  • Update frequency: every 68.8 days
  • Top authors: julienvabre (57.14%)wiseco48 (47.62%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,094 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • Install procedure had errors
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

Server metrics [RAM: ▲0.07MB] [CPU: ▼6.06ms] Passed 4 tests

An overview of server-side resources used by Eco Agenda
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0936.96 ▼2.94
Dashboard /wp-admin3.39 ▲0.0450.67 ▼8.48
Posts /wp-admin/edit.php3.50 ▲0.1548.77 ▲4.60
Add New Post /wp-admin/post-new.php5.97 ▲0.0881.76 ▼14.54
Media Library /wp-admin/upload.php3.31 ▲0.0835.28 ▲1.73

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 17 new files
Database: 2 new tables, 7 new options
New tables
wp_eco_agenda
wp_eco_param
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_eco_mini_agenda
widget_recent-comments

Browser metrics Passed 4 tests

Eco Agenda: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲16413.89 ▼0.467.99 ▲6.4944.90 ▲1.30
Dashboard /wp-admin2,207 ▲365.65 ▲0.1290.67 ▲1.7842.63 ▼0.14
Posts /wp-admin/edit.php2,112 ▲122.00 ▼0.0233.24 ▼3.3036.47 ▲0.25
Add New Post /wp-admin/post-new.php1,536 ▲823.09 ▼0.00656.58 ▼21.9267.30 ▲14.50
Media Library /wp-admin/upload.php1,409 ▲154.23 ▲0.0494.64 ▼0.8343.00 ▼0.12

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_eco_mini_agenda
    • widget_recent-comments

Smoke tests 75% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/eco-agenda/eco_mini_agenda.php:70
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/eco-agenda/eco-agenda.php:15

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)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Add an image for screenshot #4 (Example of positioning the plugin on the sidebar and only on the home page thanks to the Widget logic plugin)
The official readme.txt is a good inspiration

eco-agenda/eco-agenda.php Passed 13 tests

The principal PHP file in "Eco Agenda" v. 1.0.6 is loaded by WordPress automatically on each request
133 characters long description:
Permet l'affichage d'un mini agenda contenant des évènements. Mises à jour automatique chaque jour avec le site www.eco-sorties.fr

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected647 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP57158399
HTML190125
CSS1258123

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity1.33
▷ Minimum class complexity1.00
▷ Maximum class complexity2.00
Average method complexity1.17
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods7
▷ Static methods228.57%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions1392.86%
▷ Anonymous functions17.14%
Constants2
▷ Global constants2100.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
8 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/img/map.png0.77KB0.77KB0.00%
includes/img/date_min.png2.34KB1.44KB▼ 38.38%
includes/img/date.png0.61KB0.61KB▼ 0.96%
includes/img/activity.png0.45KB0.46KB0.00%
includes/img/close.png4.22KB1.46KB▼ 65.46%