84% visage

Code Review | Visage

WordPress plugin Visage scored 84% from 54 tests.

About plugin

  • Plugin page: visage
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2.3
  • WordPress version: 6.3.1
  • First release: Dec 28, 2014
  • Latest release: Jul 28, 2015
  • Number of updates: 34
  • Update frequency: every 6.2 days
  • Top authors: mindrun (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active / 2,320 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.08ms] Passed 4 tests

Analyzing server-side resources used by Visage
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0535.10 ▼9.90
Dashboard /wp-admin3.34 ▲0.0441.90 ▼5.53
Posts /wp-admin/edit.php3.39 ▲0.0445.72 ▼1.18
Add New Post /wp-admin/post-new.php5.92 ▲0.0483.09 ▼7.71
Media Library /wp-admin/upload.php3.27 ▲0.0434.77 ▲2.74

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Visage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.23 ▼1.061.63 ▼0.5942.85 ▼8.34
Dashboard /wp-admin2,206 ▲185.91 ▲1.0699.92 ▼3.3338.74 ▼5.18
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0836.75 ▼0.5932.43 ▼1.50
Add New Post /wp-admin/post-new.php1,533 ▲1923.18 ▲5.51666.05 ▼1.1958.30 ▼0.47
Media Library /wp-admin/upload.php1,391 ▲34.24 ▲0.04106.15 ▲11.6440.90 ▼2.26

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • 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
Good news, no errors were detected

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
Please take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function visage\\add_action() in wp-content/plugins/visage/main.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/visage/option.php:3

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)
No browser errors were detected

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
Attributes that need to be fixed:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
You can take inspiration from this readme.txt

visage/main.php 92% from 13 tests

The principal PHP file in "Visage" v. 1.0.6 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("visage.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected399 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP29511163
PO File33333153
JavaScript142060
CSS15023

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity4.88
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
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
No PNG images were found in this plugin