84% gwent-cards

Code Review | Gwent Cards

WordPress plugin Gwent Cards scored84%from 54 tests.

About plugin

  • Plugin page: gwent-cards
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.1.0-4.7.5
  • WordPress version: 6.3.1
  • First release: May 23, 2017
  • Latest release: Jun 23, 2017
  • Number of updates: 12
  • Update frequency: every 2.6 days
  • Top authors: zolmeister (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /624 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.18ms] Passed 4 tests

Server-side resources used by Gwent Cards
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.43 ▲2.97
Dashboard /wp-admin3.33 ▲0.0347.96 ▼2.76
Posts /wp-admin/edit.php3.38 ▲0.0348.69 ▼3.41
Add New Post /wp-admin/post-new.php5.91 ▲0.0290.82 ▼9.57
Media Library /wp-admin/upload.php3.25 ▲0.0335.86 ▼0.96
Gwent Cards Settings /wp-admin/options-general.php?page=gwent-cards-setting-admin3.2232.99

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Gwent Cards: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6513.59 ▼0.812.38 ▲0.1248.51 ▼0.08
Dashboard /wp-admin2,225 ▲225.89 ▲0.02111.84 ▼9.5640.72 ▼2.58
Posts /wp-admin/edit.php2,107 ▲102.03 ▲0.0242.63 ▲5.9934.59 ▼1.62
Add New Post /wp-admin/post-new.php1,548 ▲2223.13 ▼0.33645.36 ▼9.2846.53 ▼4.12
Media Library /wp-admin/upload.php1,404 ▲44.18 ▼0.0494.51 ▼6.2741.78 ▼2.67
Gwent Cards Settings /wp-admin/options-general.php?page=gwent-cards-setting-admin7892.0228.3128.63

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gwent-cards/gwent-cards-functions.php:37

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

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
1 plugin tags: gwent

gwent-cards/gwent-cards-functions.php 92% from 13 tests

The main PHP script in "Gwent Cards" version 1.1.2 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("gwent-cards.php" instead of "gwent-cards-functions.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin658 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2514534
PHP1181081
CSS26142
JSON1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.14
▷ Minimum method complexity1.00
▷ Maximum method complexity2.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%
Functions2
▷ Named functions2100.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
There are no PNG files in this plugin