78% display-your-zenodo-community

Code Review | Display your Zenodo Publications

WordPress plugin Display your Zenodo Publications scored78%from 54 tests.

About plugin

  • Plugin page: display-your-zeno...
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.6.35+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.1-5.9
  • WordPress version: 6.3.1
  • First release: Apr 29, 2020
  • Latest release: Apr 19, 2022
  • Number of updates: 16
  • Update frequency: every 46.8 days
  • Top authors: yoannspace (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /1,921 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼1.76ms] Passed 4 tests

This is a short check of server-side resources used by Display your Zenodo Publications
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0939.43 ▼3.11
Dashboard /wp-admin3.40 ▲0.0950.60 ▼2.36
Posts /wp-admin/edit.php3.51 ▲0.1548.11 ▼2.45
Add New Post /wp-admin/post-new.php6.00 ▲0.1193.69 ▲3.17
Media Library /wp-admin/upload.php3.32 ▲0.0936.95 ▲0.87
Zenodo /wp-admin/options-general.php?page=display-your-zenodo-community3.3040.05

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Display your Zenodo Publications
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲17013.65 ▼0.747.41 ▲5.1742.90 ▼4.68
Dashboard /wp-admin2,211 ▲265.83 ▼0.02133.16 ▼8.2246.87 ▲0.39
Posts /wp-admin/edit.php2,097 ▲112.00 ▼0.0646.74 ▲8.1336.01 ▼0.99
Add New Post /wp-admin/post-new.php1,521 ▼723.36 ▲0.18651.08 ▲2.2372.43 ▲18.54
Media Library /wp-admin/upload.php1,390 ▼14.18 ▼0.06111.60 ▲9.6046.13 ▼4.48
Zenodo /wp-admin/options-general.php?page=display-your-zenodo-community8752.0631.6530.59

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=display-your-zenodo-community
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+204
    Undefined offset: 0
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=display-your-zenodo-community
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
    Trying to get property 'guid' of non-object
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=display-your-zenodo-community
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+221
    Trying to get property 'ID' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=display-your-zenodo-community
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+222
    Trying to get property 'post_title' of non-object

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/display-your-zenodo-community/admin/partials/display-your-zenodo-community-admin-display.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Donate link: Please fix this invalid URI: ""
The official readme.txt is a good inspiration

display-your-zenodo-community/zenodo-plugin.php 85% from 13 tests

The main file in "Display your Zenodo Publications" v. 1.2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("display-your-zenodo-community.php" instead of "zenodo-plugin.php")

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
Success! There were no dangerous files found in this plugin579 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP1040517465
Markdown216058
CSS29052
JavaScript2004

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity7.71
▷ Minimum class complexity1.00
▷ Maximum class complexity38.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods33
▷ Static methods26.06%
▷ Public methods2781.82%
▷ Protected methods00.00%
▷ Private methods618.18%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin