10% dolipress

Code Review | DoliPress

WordPress plugin DoliPress scored10%from 54 tests.

About plugin

  • Plugin page: dolipress
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8.1
  • WordPress version: 6.3.1
  • First release: Nov 11, 2021
  • Latest release: Nov 12, 2021
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: viralagency (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /521 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • The plugin did not install without errors
    • > Error in wp-content/plugins/dolipress/functions.php+209
    Uncaught Error: Class 'GFAPI' not found in wp-content/plugins/dolipress/functions.php:209
    Stack trace:
    #0 wp-content/plugins/dolipress/functions.php(24): dpfg_get_form_id()
    #1 wp-content/plugins/dolipress/index.php(30): dolipress_init()
    #2 wp-admin/includes/plugin.php(2318): include_once('/var/www/wordpr...')
    #3 wp-admin/includes/plugin.php(663): plugin_sandbox_scrape()

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

Analyzing server-side resources used by DoliPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.38 ▼0.70
Dashboard /wp-admin3.31 ▲0.0046.71 ▼8.72
Posts /wp-admin/edit.php3.36 ▲0.0045.09 ▼2.65
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.52 ▼43.11
Media Library /wp-admin/upload.php3.23 ▲0.0033.82 ▲0.05

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for DoliPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.19 ▼1.434.52 ▲2.6845.21 ▲4.77
Dashboard /wp-admin2,206 ▲185.86 ▲1.00110.77 ▲0.2544.37 ▼0.21
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0334.61 ▼5.1534.62 ▼2.27
Add New Post /wp-admin/post-new.php1,533 ▼923.52 ▲5.37672.91 ▲68.0654.36 ▼13.83
Media Library /wp-admin/upload.php1,388 ▼04.22 ▲0.0396.01 ▼6.7841.95 ▼0.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

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
Everything seems fine, however this is by no means 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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dolipress/functions.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === dolipress === )
You can take inspiration from this readme.txt

dolipress/index.php 92% from 13 tests

This is the main PHP file of "DoliPress" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("dolipress.php" instead of "index.php")

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
Success! There were no dangerous files found in this plugin13,783 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS21,763519,564
JavaScript31,1395513,754
PHP310666427
SVG10138

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions23
▷ Named functions23100.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
2 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/QR-bitcoin.png9.57KB6.36KB▼ 33.50%
img/Dolipress-Logo.png17.49KB8.72KB▼ 50.12%