78% typewriter

Code Review | Typewriter

WordPress plugin Typewriter scored78%from 54 tests.

About plugin

  • Plugin page: typewriter
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.6.1
  • WordPress version: 6.3.1
  • First release: Sep 26, 2013
  • Latest release: Sep 26, 2013
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: gilbitron (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

10+ active /3,033 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.23MB] [CPU: ▼18.56ms] Passed 4 tests

Server-side resources used by Typewriter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.95 ▲0.4938.63 ▼7.25
Dashboard /wp-admin3.34 ▼0.0150.19 ▼18.11
Posts /wp-admin/edit.php3.39 ▲0.0348.64 ▼2.04
Add New Post /wp-admin/post-new.php4.91 ▼0.9745.07 ▼46.83
Media Library /wp-admin/upload.php3.26 ▲0.0339.68 ▲2.31

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Typewriter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,616 ▼17013.79 ▼0.581.81 ▼0.2646.36 ▲2.93
Dashboard /wp-admin2,022 ▼1555.42 ▼0.2389.72 ▼9.0645.40 ▲1.56
Posts /wp-admin/edit.php2,097 ▼62.00 ▲0.0235.34 ▼1.0735.27 ▼0.35
Add New Post /wp-admin/post-new.php6,087 ▲4,56117.42 ▼5.29798.08 ▲162.2472.89 ▲15.97
Media Library /wp-admin/upload.php1,397 ▼64.22 ▲0.00109.65 ▲4.1646.49 ▼0.57

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/typewriter/includes/markdown/Readme.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Michelf\\Markdown' not found in wp-content/plugins/typewriter/includes/markdown/Michelf/MarkdownExtra.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/typewriter/typewriter.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

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:
  • Screenshots: These screenshots require images: #1 (Markdown editor with some example content), #2 (Markdown output with some example content)
The official readme.txt might help

typewriter/typewriter.php Passed 13 tests

The principal PHP file in "Typewriter" v. 1.0 is loaded by WordPress automatically on each request
93 characters long description:
Typewriter replaces the Visual Editor with a simple Markdown editor for your posts and pages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected2,325 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP44367902,048
Markdown2800215
JSON10031
PO File17731

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity43.25
▷ Minimum class complexity1.00
▷ Maximum class complexity102.00
Average method complexity2.65
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods103
▷ Static methods10.97%
▷ Public methods1312.62%
▷ Protected methods9087.38%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.08MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png51.34KB15.38KB▼ 70.04%
screenshot-2.png33.85KB10.71KB▼ 68.36%