90% the-typography

Code Review | The Typography

WordPress plugin The Typography scored90%from 54 tests.

About plugin

  • Plugin page: the-typography
  • Plugin version: 1.3.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.4
  • WordPress version: 6.3.1
  • First release: Mar 11, 2019
  • Latest release: Mar 20, 2020
  • Number of updates: 17
  • Update frequency: every 22.2 days
  • Top authors: melonpan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,332 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.37MB] [CPU: ▼5.42ms] Passed 4 tests

This is a short check of server-side resources used by The Typography
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.85 ▲0.3950.20 ▲5.50
Dashboard /wp-admin3.69 ▲0.3950.10 ▼5.90
Posts /wp-admin/edit.php3.74 ▲0.3852.53 ▼3.06
Add New Post /wp-admin/post-new.php6.38 ▲0.4992.79 ▼17.25
Media Library /wp-admin/upload.php3.55 ▲0.3242.64 ▲4.53

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for The Typography
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7913.18 ▼1.482.11 ▲0.1540.81 ▼2.13
Dashboard /wp-admin2,221 ▲214.83 ▼1.02113.95 ▲11.0141.49 ▲4.32
Posts /wp-admin/edit.php2,097 ▼32.01 ▼0.0336.79 ▼3.2530.52 ▼7.00
Add New Post /wp-admin/post-new.php1,536 ▼924.90 ▲1.68659.08 ▼24.7059.80 ▼7.18
Media Library /wp-admin/upload.php1,397 ▼34.24 ▲0.12113.13 ▼0.0348.47 ▼0.04

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 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 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 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: customizer, blocks, fonts, typography, gutenberg...

the-typography/the-typography.php Passed 13 tests

The main PHP file in "The Typography" ver. 1.3.0 adds more information about the plugin and also serves as the entry point for this plugin
57 characters long description:
Add Typography to your Gutenberg site using Google Fonts.

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
There were no executable files found in this plugin1,296 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP183571291,287
JavaScript30267
CSS2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity9.09
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.41
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces1
Interfaces0
Traits1
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods63
▷ Static methods2844.44%
▷ Public methods4165.08%
▷ Protected methods23.17%
▷ Private methods2031.75%
Functions19
▷ Named functions1052.63%
▷ Anonymous functions947.37%
Constants5
▷ Global constants5100.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
There are no PNG files in this plugin