84% ternair-profile

Code Review | Ternair Profile Widget

WordPress plugin Ternair Profile Widget scored 84% from 54 tests.

About plugin

  • Plugin page: ternair-profile
  • Plugin version: 1.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.6
  • WordPress version: 6.3.1
  • First release: Mar 15, 2017
  • Latest release: Dec 18, 2020
  • Number of updates: 24
  • Update frequency: every 57.1 days
  • Top authors: ternair (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 4,493 total downloads

Benchmarks

Plugin footprint 83% from 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.02MB] [CPU: ▼6.32ms] Passed 4 tests

Analyzing server-side resources used by Ternair Profile Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.67 ▼8.82
Dashboard /wp-admin3.33 ▲0.0249.64 ▲1.13
Posts /wp-admin/edit.php3.38 ▲0.0244.28 ▼5.41
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.70 ▼5.63
Media Library /wp-admin/upload.php3.25 ▲0.0232.33 ▼5.42
Ternair Profile Settings /wp-admin/options-general.php?page=tp_list_options3.2129.43

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_wp_ternair_profile
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Ternair Profile Widget: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,868 ▲13313.57 ▼0.84103.20 ▲101.1537.17 ▼14.18
Dashboard /wp-admin2,210 ▲194.88 ▼0.93109.75 ▲6.7641.17 ▲1.58
Posts /wp-admin/edit.php2,090 ▲12.02 ▼0.0133.46 ▼3.2134.65 ▼0.99
Add New Post /wp-admin/post-new.php1,540 ▼223.65 ▲5.55675.95 ▲51.9247.99 ▼4.20
Media Library /wp-admin/upload.php1,392 ▲14.15 ▼0.0795.02 ▼6.0644.29 ▲1.19
Ternair Profile Settings /wp-admin/options-general.php?page=tp_list_options7822.0623.3727.81

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_wp_ternair_profile
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ternair-profile/wp_ternair_profile.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === ternair-profile === )
You can take inspiration from this readme.txt

ternair-profile/wp_ternair_profile.php 92% from 13 tests

The principal PHP file in "Ternair Profile Widget" v. 1.1.6 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("ternair-profile.php" instead of "wp_ternair_profile.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected403 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP19122403

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity52.00
▷ Minimum class complexity52.00
▷ Maximum class complexity52.00
Average method complexity5.64
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin