74% star-wars-edge-of-the-empire-character-sheets

Code Review | Star Wars Edge of the Empire Character Sheets

WordPress plugin Star Wars Edge of the Empire Character Sheets scored74%from 54 tests.

About plugin

  • Plugin page: star-wars-edge-of...
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.1
  • WordPress version: 6.3.1
  • First release: Apr 13, 2015
  • Latest release: May 1, 2015
  • Number of updates: 50
  • Update frequency: every 0.4 days
  • Top authors: Davell87 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,056 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.27MB] [CPU: ▼9.99ms] Passed 4 tests

An overview of server-side resources used by Star Wars Edge of the Empire Character Sheets
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2836.54 ▼5.41
Dashboard /wp-admin3.59 ▲0.2445.28 ▼20.25
Posts /wp-admin/edit.php3.64 ▲0.2846.92 ▼1.98
Add New Post /wp-admin/post-new.php6.17 ▲0.2885.20 ▼12.30
Media Library /wp-admin/upload.php3.52 ▲0.2835.55 ▲1.69

Server storage [IO: ▲0.55MB] [DB: ▲0.04MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 14 new files
Database: 7 new tables, 7 new options
New tables
wp_sweecs_characters_inventory
wp_sweecs_characters_talents
wp_sweecs_characters
wp_sweecs_careers
wp_sweecs_races
wp_sweecs_skills
wp_sweecs_talents
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
sweecs_db_version

Browser metrics Passed 4 tests

Checking browser requirements for Star Wars Edge of the Empire Character Sheets
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲4513.19 ▼1.391.69 ▼0.2642.28 ▼1.23
Dashboard /wp-admin2,219 ▲285.84 ▲0.7796.57 ▼22.7540.80 ▼2.67
Posts /wp-admin/edit.php2,105 ▲162.06 ▲0.0440.19 ▲1.6335.54 ▲0.88
Add New Post /wp-admin/post-new.php1,527 ▼717.69 ▼5.44665.16 ▼12.1049.63 ▼3.29
Media Library /wp-admin/upload.php1,404 ▲164.21 ▼0.0694.20 ▼4.3241.38 ▼4.17

Uninstaller [IO: ▲0.00MB] [DB: ▲0.04MB] 50% 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
  • The plugin did not uninstall successfully, leaving 7 tables in the database
    • wp_sweecs_careers
    • wp_sweecs_characters
    • wp_sweecs_talents
    • wp_sweecs_skills
    • wp_sweecs_characters_inventory
    • wp_sweecs_races
    • wp_sweecs_characters_talents
  • Zombie WordPress options detected upon uninstall: 7 options
    • sweecs_db_version
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

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 | 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
  • 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/star-wars-edge-of-the-empire-character-sheets/pages/inv.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/star-wars-edge-of-the-empire-character-sheets/main.php:81
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/star-wars-edge-of-the-empire-character-sheets/pages/edit.php on line 194
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/star-wars-edge-of-the-empire-character-sheets/pages/inv.php on line 12
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/star-wars-edge-of-the-empire-character-sheets/pages/dice.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/star-wars-edge-of-the-empire-character-sheets/pages/edit.php:194
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_col() on null in wp-content/plugins/star-wars-edge-of-the-empire-character-sheets/pages/dice.php:11
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/star-wars-edge-of-the-empire-character-sheets/pages/view.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/star-wars-edge-of-the-empire-character-sheets/pages/viewTalents.php:11
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/star-wars-edge-of-the-empire-character-sheets/pages/cTalents.php:11

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid url: ""
You can take inspiration from this readme.txt

star-wars-edge-of-the-empire-character-sheets/main.php 92% from 13 tests

The principal PHP file in "Star Wars Edge of the Empire Character Sheets" v. 2.0.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("star-wars-edge-of-the-empire-character-sheets.php" instead of "main.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 detected4,578 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP871972,700
JavaScript20181,420
CSS310236458

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.13
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%
Functions6
▷ Named functions6100.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
PNG images were not found in this plugin