94% twivatar

Code Review | Twivatar

WordPress plugin Twivatar scored 94% from 54 tests.

About plugin

  • Plugin page: twivatar
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8.0-3.5.0
  • WordPress version: 5.8.1
  • First release: May 8, 2011
  • Latest release: Jan 28, 2013
  • Number of updates: 7
  • Update frequency: every 90.2 days
  • Top authors: GaryJ (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,458 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

This is a short check of server-side resources used by Twivatar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1226.69 ▲4.76
Dashboard /wp-admin3.06 ▲0.0137.13 ▼7.86
Posts /wp-admin/edit.php3.11 ▲0.0144.39 ▲4.92
Add New Post /wp-admin/post-new.php5.42 ▼0.0190.98 ▼552.45
Media Library /wp-admin/upload.php3.00 ▲0.0035.68 ▲0.62

Server storage [IO: ▲0.01MB] [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: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Twivatar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,677 ▲8116.21 ▲0.498.78 ▼0.1446.79 ▼7.12
Dashboard /wp-admin2,970 ▲366.06 ▲0.06137.60 ▼11.64113.71 ▼3.29
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0267.52 ▲1.5893.52 ▲3.13
Add New Post /wp-admin/post-new.php1,876 ▲37619.15 ▲0.29369.71 ▼7.52108.09 ▲3.06
Media Library /wp-admin/upload.php1,807 ▼05.04 ▲0.01150.00 ▼0.81117.56 ▼4.09

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/twivatar/twivatar.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

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
Please fix the following attributes:
  • Plugin Name: You should set the name of your plugin on the first line ( === twivatar === )
You can look at the official readme.txt

twivatar/twivatar.php Passed 13 tests

The primary PHP file in "Twivatar" version 1.0.2 is used by WordPress to initiate all plugin functionality
91 characters long description:
Adds a shortcode that echos the current Twitter avatar for a username. Image URL is cached.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin86 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22813686

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods350.00%
▷ Protected methods350.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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin