74% depict

Code Review | Depict

WordPress plugin Depict scored 74% from 54 tests.

About plugin

  • Plugin page: depict
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.1.1
  • WordPress version: 6.3.1
  • First release: May 14, 2017
  • Latest release: May 5, 2019
  • Number of updates: 23
  • Update frequency: every 31.4 days
  • Top authors: tradesouthwest@gmail.com (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,015 total downloads

Benchmarks

Plugin footprint 65% 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.13MB] [CPU: ▼3.94ms] Passed 4 tests

Analyzing server-side resources used by Depict
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1435.72 ▼6.88
Dashboard /wp-admin3.43 ▲0.1345.23 ▼2.38
Posts /wp-admin/edit.php3.54 ▲0.1948.86 ▲2.98
Add New Post /wp-admin/post-new.php6.01 ▲0.1393.94 ▼9.46
Media Library /wp-admin/upload.php3.35 ▲0.1241.64 ▲8.37
Depict /wp-admin/options-general.php?page=depict3.3331.67

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_depict_widget
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Depict
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.23 ▼1.151.72 ▼0.5942.45 ▼3.21
Dashboard /wp-admin2,210 ▲224.88 ▲0.02107.91 ▲3.0540.48 ▲0.42
Posts /wp-admin/edit.php2,090 ▲11.99 ▼0.0039.19 ▲2.0435.30 ▼1.28
Add New Post /wp-admin/post-new.php1,523 ▲923.41 ▲5.90673.58 ▲15.5057.03 ▲7.79
Media Library /wp-admin/upload.php1,395 ▲74.16 ▼0.0499.62 ▼2.8245.28 ▼0.97
Depict /wp-admin/options-general.php?page=depict9762.1827.6056.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/depict/uninstall.php+24
    Undefined variable: depict_wpdb
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_depict_widget
    • widget_theysaidso_widget
    • theysaidso_admin_options

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/depict/inc/Depict_Widget.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: users, author profile, author link, profile, author

depict/depict.php Passed 13 tests

This is the main PHP file of "Depict" version 1.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
73 characters long description:
Adds new fields to User Profile which display on a custom widget or page.

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 detected855 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP690103669
CSS140186

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.16MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img-fa-instagram.png1.32KB0.72KB▼ 45.61%
assets/img-fa-twitter.png1.12KB0.90KB▼ 19.61%
assets/img-fa-linkedin.png0.91KB0.91KB0.00%
assets/img-fa-google-plus.png1.22KB1.02KB▼ 16.85%
assets/img-fa-pinterest.png1.97KB1.50KB▼ 23.90%