84% dashpress

Code Review | DashPress

WordPress plugin DashPress scored84%from 54 tests.

About plugin

  • Plugin page: dashpress
  • Plugin version: 5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0+
  • WordPress version: 6.3.1
  • First release: Dec 21, 2010
  • Latest release: May 25, 2020
  • Number of updates: 97
  • Update frequency: every 36.2 days
  • Top authors: arena (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /5,359 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.55ms] Passed 4 tests

This is a short check of server-side resources used by DashPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.11 ▲0.25
Dashboard /wp-admin3.39 ▲0.0846.78 ▼1.86
Posts /wp-admin/edit.php3.39 ▲0.0344.91 ▼2.97
Add New Post /wp-admin/post-new.php5.92 ▲0.03106.19 ▲14.39
Media Library /wp-admin/upload.php3.26 ▲0.0334.83 ▼1.61

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

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

Browser metrics Passed 4 tests

A check of browser resources used by DashPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,776 ▲1,04113.62 ▼0.811.74 ▼0.1641.13 ▼6.34
Dashboard /wp-admin3,185 ▲9975.19 ▼0.72111.85 ▼3.3186.98 ▲41.97
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0541.07 ▲2.3635.82 ▲2.39
Add New Post /wp-admin/post-new.php1,529 ▲823.17 ▲0.12665.08 ▲5.9557.08 ▲1.33
Media Library /wp-admin/upload.php1,388 ▼04.20 ▼0.1097.47 ▼4.3241.32 ▼2.00

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

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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/dashpress/dashpress.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/dashpress/dbp-admin/includes/admin_footer.php:2
    • > PHP Warning
      Use of undefined constant PLUGINDIR - assumed 'PLUGINDIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/dashpress/dashpress.php on line 20
    • > PHP Fatal error
      Uncaught Error: Class 'SimplePie_Cache' not found in wp-content/plugins/dashpress/dbp-admin/class/DBP_SimplePie_Cache.class.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'SimplePie_Item' not found in wp-content/plugins/dashpress/dbp-admin/class/DBP_SimplePie_Item.class.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'SimplePie_Cache_Base' not found in wp-content/plugins/dashpress/dbp-admin/class/DBP_SimplePie_Cache_transient.class.php:2

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 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Contributors: The plugin contributors field is not present
You can look at the official readme.txt

dashpress/dashpress.php Passed 13 tests

The principal PHP file in "DashPress" v. 5.0 is loaded by WordPress automatically on each request
40 characters long description:
The ultimate Dashboard management plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected1,003 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP711439595
JavaScript1577203
CSS2317115
PO File1385590

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity11.50
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods43
▷ Static methods24.65%
▷ Public methods43100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants342.86%
▷ Class constants457.14%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
dbp-admin/images/PP_M.png2.57KB1.84KB▼ 28.20%