66% typetura

Code Review | Typetura

WordPress plugin Typetura scored 66% from 54 tests.

About plugin

  • Plugin page: typetura
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.7.1
  • WordPress version: 6.3.1
  • First release: May 28, 2020
  • Latest release: Apr 20, 2021
  • Number of updates: 19
  • Update frequency: every 17.3 days
  • Top authors: typetura (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 576 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.22MB] [CPU: ▼16.02ms] Passed 4 tests

This is a short check of server-side resources used by Typetura
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.31 ▼4.35
Dashboard /wp-admin3.07 ▼0.2326.30 ▼20.61
Posts /wp-admin/edit.php3.21 ▼0.1532.04 ▼12.24
Add New Post /wp-admin/post-new.php5.45 ▼0.4468.33 ▼25.05
Media Library /wp-admin/upload.php3.14 ▼0.0926.61 ▼6.17
Typetura Settings /wp-admin/options-general.php?page=typetura3.0626.98

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Typetura
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲10613.68 ▼0.313.69 ▲1.8739.83 ▼4.64
Dashboard /wp-admin2,213 ▲254.86 ▼0.0497.11 ▼5.9239.47 ▼1.05
Posts /wp-admin/edit.php2,090 ▲12.01 ▲0.0134.33 ▲1.1031.05 ▼5.93
Add New Post /wp-admin/post-new.php1,523 ▲923.13 ▲5.69670.39 ▲18.9454.33 ▼2.47
Media Library /wp-admin/upload.php1,392 ▲44.31 ▲0.0994.09 ▼5.2842.65 ▼3.07
Typetura Settings /wp-admin/options-general.php?page=typetura1,0012.1823.8627.01

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=typetura
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'Typetura_Admin' does not have a method 'enqueue_styles'
    • > GET request to /wp-admin/options-general.php?page=typetura
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'Typetura_Admin' does not have a method 'enqueue_scripts'
    • > GET request to /wp-admin/options-general.php?page=typetura
    • > Notice in wp-content/plugins/typetura/admin/partials/typetura-admin-display.php+46
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/options-general.php?page=typetura
    • > Warning in wp-content/plugins/typetura/admin/partials/typetura-admin-display.php+225
    Invalid argument supplied for foreach()

SRP 0% 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 take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/typetura/public/partials/typetura-public-display.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/typetura/admin/partials/typetura-admin-display.php:19

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=typetura
    • > Network (severe)
    https://cdn.typetura.com/typetura.js?apiKey=XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX&ver=6.3.1 - Failed to load resource: the server responded with a status of 401 ()
    • > GET request to /wp-admin/options-general.php?page=typetura
    • > Network (severe)
    https://cdn.typetura.com/armonk/typetura-admin.css?apiKey=XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX&ver=6.3.1 - Failed to load resource: the server responded with a status of 401 ()

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === typetura === )
The official readme.txt is a good inspiration

typetura/typetura.php Passed 13 tests

"Typetura" version 1.0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
94 characters long description:
We typeset your website! Typography that works on your website regardless of layout or device.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin1,111 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12119425679
CSS2010286
JavaScript25690
SVG10056

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity2.29
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.36
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods25
▷ Static methods28.00%
▷ Public methods2080.00%
▷ Protected methods00.00%
▷ Private methods520.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
9 PNG files occupy 2.84MB with 1.68MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png335.43KB154.75KB▼ 53.87%
assets/screenshot-5.png331.36KB130.38KB▼ 60.65%
assets/banner-1544x500.png630.62KB264.57KB▼ 58.05%
assets/banner-772x250.png169.34KB71.60KB▼ 57.72%
assets/screenshot-4.png277.37KB95.58KB▼ 65.54%