84% topdash

Code Review | Topdash

WordPress plugin Topdash scored 84% from 54 tests.

About plugin

  • Plugin page: topdash
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Nov 11, 2014
  • Latest release: Sep 27, 2016
  • Number of updates: 11
  • Update frequency: every 62.4 days
  • Top authors: urre (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 762 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.94ms] Passed 4 tests

A check of server-side resources used by Topdash
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.72 ▼0.32
Dashboard /wp-admin3.32 ▲0.0147.74 ▼1.78
Posts /wp-admin/edit.php3.37 ▲0.0146.17 ▼0.13
Add New Post /wp-admin/post-new.php5.92 ▲0.0381.69 ▼21.00
Media Library /wp-admin/upload.php3.24 ▲0.0134.57 ▼0.65

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

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

Browser metrics Passed 4 tests

Topdash: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,136 ▲40113.68 ▼0.717.54 ▲5.7144.96 ▲0.21
Dashboard /wp-admin2,322 ▲1344.90 ▲0.01105.60 ▼19.1839.23 ▼5.47
Posts /wp-admin/edit.php2,205 ▲1162.04 ▲0.0437.59 ▲1.3434.44 ▼4.57
Add New Post /wp-admin/post-new.php1,550 ▲1718.56 ▼4.62613.38 ▼52.4846.97 ▼18.23
Media Library /wp-admin/upload.php1,501 ▲1104.24 ▼0.0397.82 ▼1.9242.80 ▼3.03

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
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/topdash/topdash.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

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: Screenshot #1 (Topdash) image required
The official readme.txt might help

topdash/topdash.php Passed 13 tests

"Topdash" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
115 characters long description:
Like OS X admin bar menu icons, but for WordPress. Easy access to common wp-admin menus in the top right admin bar.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected148 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP1262586
CSS110036
Markdown16017
JavaScript1209

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.00%
Functions0
▷ Named functions00.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
2 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
topdash.png31.28KB14.22KB▼ 54.54%
screenshot-1.png31.28KB14.22KB▼ 54.54%