10% eco-agenda

Code Review | Eco Agenda

WordPress plugin Eco Agenda scored 10% from 54 tests.

About plugin

  • Plugin page: eco-agenda
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9+
  • WordPress version: 5.8.1
  • First release: Jun 24, 2019
  • Latest release: May 21, 2021
  • Number of updates: 13
  • Update frequency: every 53.8 days
  • Top authors: julienvabre (92.31%)wiseco48 (15.38%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 565 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+5663
    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.08MB] [CPU: ▼141.98ms] 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 /2.92 ▲0.2038.55 ▲21.23
Dashboard /wp-admin3.14 ▲0.0945.21 ▼0.21
Posts /wp-admin/edit.php3.19 ▲0.0843.34 ▲0.43
Add New Post /wp-admin/post-new.php5.50 ▲0.0784.88 ▼559.86
Media Library /wp-admin/upload.php3.08 ▲0.0833.64 ▼8.29

Server storage [IO: ▲0.06MB] [DB: ▲0.62MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 17 new files
Database: 2 new tables, 1 new option
New tables
wp_eco_agenda
wp_eco_param
New WordPress options
widget_eco_mini_agenda

Browser metrics Passed 4 tests

Eco Agenda: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,805 ▲18216.65 ▲1.1511.09 ▲3.1149.07 ▼3.48
Dashboard /wp-admin2,985 ▲515.91 ▼0.05135.74 ▼14.70110.16 ▼10.78
Posts /wp-admin/edit.php2,754 ▲182.69 ▲0.0165.48 ▲2.7484.25 ▼5.52
Add New Post /wp-admin/post-new.php1,508 ▲618.80 ▲0.20360.05 ▼8.66112.50 ▼4.17
Media Library /wp-admin/upload.php1,825 ▲215.02 ▲0.00150.09 ▼3.06125.48 ▼1.44

Uninstaller [IO: ▲0.00MB] [DB: ▲0.62MB] 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+5663
    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: 1 option
    • widget_eco_mini_agenda

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: Call to undefined function plugin_dir_path() in wp-content/plugins/eco-agenda/eco-agenda.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/eco-agenda/eco_mini_agenda.php:70

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.5 is loaded by WordPress automatically on each request
132 characters long description:
Permet l'affichage d'un mini agenda contenant des évènements. Mises à jour automatique chaque jour avec le site www.eco-guides.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/activity_min.png3.86KB1.27KB▼ 67.14%
includes/img/eco-guides.png11.30KB5.36KB▼ 52.56%
includes/img/date.png0.61KB0.61KB▼ 0.96%
includes/img/date_min.png2.34KB1.44KB▼ 38.38%
includes/img/activity.png0.45KB0.46KB0.00%