84% dpepress

Code Review | DPEPress

WordPress plugin DPEPress scored84%from 54 tests.

About plugin

  • Plugin page: dpepress
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Jun 21, 2017
  • Latest release: Nov 9, 2017
  • Number of updates: 16
  • Update frequency: every 8.8 days
  • Top authors: darkyudex (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,001 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼6.75ms] Passed 4 tests

Analyzing server-side resources used by DPEPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.30 ▼2.21
Dashboard /wp-admin3.31 ▼0.0352.49 ▼12.07
Posts /wp-admin/edit.php3.36 ▲0.0145.43 ▼6.75
Add New Post /wp-admin/post-new.php5.89 ▲0.0194.85 ▼5.96
Media Library /wp-admin/upload.php3.24 ▲0.0136.56 ▲4.52
DPEPress /wp-admin/options-general.php?page=dpepress-settings3.2032.46

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for DPEPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.25 ▼0.031.72 ▲0.1239.77 ▼2.76
Dashboard /wp-admin2,199 ▲225.62 ▲0.0585.29 ▼7.3339.71 ▼2.85
Posts /wp-admin/edit.php2,104 ▲11.98 ▲0.0334.63 ▼5.3035.21 ▼1.04
Add New Post /wp-admin/post-new.php1,529 ▼523.54 ▲5.38661.83 ▲33.0152.55 ▼14.87
Media Library /wp-admin/upload.php1,395 ▼54.21 ▲0.05101.39 ▼0.3744.91 ▼0.40
DPEPress /wp-admin/options-general.php?page=dpepress-settings8621.9924.7330.36

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

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
Even though no errors were found, this is by no means an exhaustive test

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 fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dpepress/dpepress.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% 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
Attributes that need to be fixed:
  • Screenshots: A description for screenshot #3 is required in dpepress/assets to your readme.txt
You can take inspiration from this readme.txt

dpepress/dpepress.php Passed 13 tests

The primary PHP file in "DPEPress" version 0.3 is used by WordPress to initiate all plugin functionality
132 characters long description:
Intégrer facilement des DPE (Diagnostics de Performance Energétique) et des GES (Gaz à Effets de Serre) sur votre site Wordpress.

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 detected732 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript26012579
PHP12628153

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/plugin-tinymce/dpe-icon.png0.61KB0.53KB▼ 13.20%
js/plugin-tinymce/ges-icon.png0.79KB0.77KB▼ 3.08%
images/DPE-exemple.png29.42KB9.34KB▼ 68.25%
images/logo-mini.png8.29KB3.60KB▼ 56.62%