80% unicard

Code Review | UniCard

WordPress plugin UniCard scored 80% from 54 tests.

About plugin

  • Plugin page: unicard
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Mar 19, 2020
  • Latest release: Mar 27, 2020
  • Number of updates: 23
  • Update frequency: every 0.4 days
  • Top authors: khleomix (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 792 total downloads

Benchmarks

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

This is a short check of server-side resources used by UniCard
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.73 ▼0.7314.08 ▼33.77
Dashboard /wp-admin2.77 ▼0.5315.65 ▼33.18
Posts /wp-admin/edit.php2.77 ▼0.5816.87 ▼30.99
Add New Post /wp-admin/post-new.php2.77 ▼3.1118.29 ▼74.08
Media Library /wp-admin/upload.php2.77 ▼0.4616.47 ▼21.50

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

UniCard: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.22 ▼1.151.74 ▼0.4345.02 ▼3.21
Dashboard /wp-admin2,209 ▲214.84 ▼0.0396.99 ▼17.9342.69 ▼6.95
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0339.98 ▲1.5435.68 ▲4.10
Add New Post /wp-admin/post-new.php6,437 ▲4,90223.65 ▲0.56868.00 ▲171.6985.01 ▲31.30
Media Library /wp-admin/upload.php1,385 ▼34.16 ▼0.1097.99 ▼10.6544.97 ▼3.65

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/unicard/src/init.php+39
    Undefined variable: version
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: custom card block, gutenberg

unicard/plugin.php 92% from 13 tests

Analyzing the main PHP file in "UniCard" version 1.0.2
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("unicard.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin8,298 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JSON2007,124
Sass39783405
JavaScript43997374
CSS230311
PHP2106347
Markdown112036
SVG1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
No PNG files were detected