84% wp-t-shape

Code Review | WP T-Shape

WordPress plugin WP T-Shape scored84%from 54 tests.

About plugin

  • Plugin page: wp-t-shape
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9
  • WordPress version: 6.3.1
  • First release: Jan 24, 2018
  • Latest release: Jan 24, 2018
  • Number of updates: 3
  • Update frequency: every 5.3 days
  • Top authors: besserdichredmann (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /567 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
Installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼2.79ms] Passed 4 tests

An overview of server-side resources used by WP T-Shape
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1042.21 ▼1.55
Dashboard /wp-admin3.40 ▲0.1052.74 ▲1.04
Posts /wp-admin/edit.php3.52 ▲0.1652.14 ▲2.41
Add New Post /wp-admin/post-new.php6.00 ▲0.1286.85 ▼13.04
Media Library /wp-admin/upload.php3.32 ▲0.1044.08 ▲5.75
WP T-Shape Options /wp-admin/options-general.php?page=wp-t-shape/wp-tshape.php3.2936.26
Add New T-Shape /wp-admin/post-new.php?post_type=t_shape3.3839.76
All T-Shapes /wp-admin/edit.php?post_type=t_shape3.3740.91

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 25 new files
Database: 2 new tables, 6 new options
New tables
wp_bur_ts_level_types
wp_bur_ts_skills
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

WP T-Shape: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲11313.90 ▼0.531.79 ▲0.1547.75 ▲2.69
Dashboard /wp-admin2,258 ▲705.05 ▲0.13102.68 ▼2.3741.79 ▲0.37
Posts /wp-admin/edit.php2,143 ▲512.28 ▲0.2837.69 ▼5.9333.19 ▼4.06
Add New Post /wp-admin/post-new.php1,556 ▲4223.47 ▲5.90691.13 ▲2.6136.75 ▼28.51
Media Library /wp-admin/upload.php1,443 ▲554.33 ▲0.12117.26 ▼2.1147.55 ▼2.40
WP T-Shape Options /wp-admin/options-general.php?page=wp-t-shape/wp-tshape.php1,1832.4351.3027.83
Add New T-Shape /wp-admin/post-new.php?post_type=t_shape1,7042.8464.3646.65
All T-Shapes /wp-admin/edit.php?post_type=t_shape1,1162.2435.7128.84

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/post-new.php?post_type=t_shape
    • > Warning in wp-content/plugins/wp-t-shape/includes/backend/metaboxes.php+14
    count(): Parameter must be an array or an object that implements Countable

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: profile, cv, skills, t-shape, diagram

wp-t-shape/wp-tshape.php 85% from 13 tests

Analyzing the main PHP file in "WP T-Shape" version 1.0
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-t-shape.php" instead of "wp-tshape.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,804 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP10227107609
CSS36037578
Sass2682345
PO File2108100267
JavaScript1015

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity9.67
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces2
Interfaces1
Traits0
Classes2
▷ Abstract classes150.00%
▷ Concrete classes150.00%
▷ Final classes00.00%
Methods10
▷ Static methods220.00%
▷ Public methods990.00%
▷ Protected methods110.00%
▷ Private methods00.00%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.18MB with 0.10MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/backend/options-helper.png21.58KB11.04KB▼ 48.84%
includes/backend/all-logos.png166.62KB65.87KB▼ 60.47%