10% dramatars

Code Review | Dramatar

WordPress plugin Dramatar scored10%from 54 tests.

About plugin

  • Plugin page: dramatars
  • Plugin version: 0.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.6
  • WordPress version: 6.3.1
  • First release: Sep 2, 2011
  • Latest release: Aug 7, 2013
  • Number of updates: 58
  • Update frequency: every 12.2 days
  • Top authors: darkwolf74 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,024 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/dramatars/dramatars.php+25
    Methods with the same name as their class will not be constructors in a future version of PHP; dramatar has a deprecated constructor

Server metrics [RAM: ▼1.90MB] [CPU: ▼48.54ms] Passed 4 tests

An overview of server-side resources used by Dramatar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.374.81 ▼29.35
Dashboard /wp-admin2.11 ▼1.205.22 ▼38.33
Posts /wp-admin/edit.php2.11 ▼1.255.61 ▼43.22
Add New Post /wp-admin/post-new.php2.11 ▼3.785.30 ▼83.24
Media Library /wp-admin/upload.php2.11 ▼1.127.59 ▼26.08
Dramatars /wp-admin/options-general.php?page=dramatars/dramatars.php2.115.52

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Dramatar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.40 ▼0.971.62 ▼0.0341.96 ▼0.60
Dashboard /wp-admin2,210 ▲185.99 ▲1.0594.51 ▼24.3837.93 ▼8.74
Posts /wp-admin/edit.php2,096 ▲102.10 ▲0.1039.36 ▼1.2534.80 ▼0.82
Add New Post /wp-admin/post-new.php1,536 ▲323.14 ▲0.03671.79 ▲62.6956.49 ▲9.07
Media Library /wp-admin/upload.php1,392 ▲74.19 ▼0.1295.69 ▲2.5039.19 ▼3.86
Dramatars /wp-admin/options-general.php?page=dramatars/dramatars.php1,1426.57188.6642.35

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/dramatars/dramatars.php+25
    Methods with the same name as their class will not be constructors in a future version of PHP; dramatar has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=dramatars/dramatars.php
    • > Deprecated in wp-content/plugins/dramatars/dramatars.php+25
    Methods with the same name as their class will not be constructors in a future version of PHP; dramatar has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=dramatars/dramatars.php
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=dramatars/dramatars.php
    • > Notice in wp-content/plugins/dramatars/dramatars.php+111
    Undefined index: no_gravatars
    • > GET request to /wp-admin/options-general.php?page=dramatars/dramatars.php
    • > Notice in wp-content/plugins/dramatars/dramatars.php+113
    Undefined index: support_given
    • > GET request to /wp-admin/options-general.php?page=dramatars/dramatars.php
    • > Warning in wp-content/plugins/dramatars/dramatars.php+156
    simplexml_load_string(): Entity: line 1: parser error : StartTag: invalid element name
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=dramatars/dramatars.php
    • > Warning in wp-content/plugins/dramatars/dramatars.php+156
    simplexml_load_string(): <!doctype html>
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=dramatars/dramatars.php
    • > Warning in wp-content/plugins/dramatars/dramatars.php+156
    simplexml_load_string(): ^
    • > GET request to /wp-admin/options-general.php?page=dramatars/dramatars.php
    • > Warning in wp-content/plugins/dramatars/dramatars.php+156
    simplexml_load_string(): Entity: line 1: parser error : Extra content at the end of the document
    • > GET request to /wp-admin/options-general.php?page=dramatars/dramatars.php
    • > Notice in wp-content/plugins/dramatars/dramatars.php+158
    Trying to get property 'channel' of non-object
    • > GET request to /wp-admin/options-general.php?page=dramatars/dramatars.php
    • > Notice in wp-content/plugins/dramatars/dramatars.php+158
    Trying to get property 'item' of non-object
    • > GET request to /wp-admin/options-general.php?page=dramatars/dramatars.php
    • > Warning in wp-content/plugins/dramatars/dramatars.php+158
    Invalid argument supplied for foreach()

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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/dramatars/dramatars.php:30

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=dramatars/dramatars.php
    • > Network (severe)
    http://dramatar.com/avatar/spirograph/00000000000000000000000000000000.png?s=32 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=dramatars/dramatars.php
    • > Network (severe)
    http://dramatar.com/avatar/abstract/00000000000000000000000000000000.png?s=32 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=dramatars/dramatars.php
    • > Network (severe)
    http://dramatar.com/avatar/arc/00000000000000000000000000000000.png?s=32 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=dramatars/dramatars.php
    • > Network (severe)
    http://dramatar.com/avatar/boxy/00000000000000000000000000000000.png?s=32 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=dramatars/dramatars.php
    • > Network (severe)
    http://dramatar.com/avatar/ragdoll/00000000000000000000000000000000.png?s=32 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=dramatars/dramatars.php
    • > Network (severe)
    http://dramatar.com/avatar/anime/00000000000000000000000000000000.png?s=32 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=dramatars/dramatars.php
    • > Other (severe) in unknown
    chrome-error://chromewebdata/ - Refused to display 'https://developers.google.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Dramatar Avatars), #2 (Dramatar Type Selection)
You can take inspiration from this readme.txt

dramatars/dramatars.php 92% from 13 tests

The entry point to "Dramatar" version 0.4.2 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 303 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected126 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11927126

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png23.98KB8.94KB▼ 62.71%
screenshot-1.png7.55KB3.43KB▼ 54.53%