83% headline-analyzer

Code Review | Headline Analyzer

WordPress plugin Headline Analyzer scored83%from 54 tests.

About plugin

  • Plugin page: headline-analyzer
  • Plugin version: 1.3.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Jun 6, 2022
  • Latest release: Nov 21, 2023
  • Number of updates: 24
  • Update frequency: every 22.3 days
  • Top authors: keenankaufman (45.83%)psethre (33.33%)jlegreid (29.17%)

Code review

54 tests

User reviews

11 reviews

Install metrics

1,000+ active /19,202 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼4.01ms] Passed 4 tests

A check of server-side resources used by Headline Analyzer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1239.12 ▼6.49
Dashboard /wp-admin3.43 ▲0.0849.45 ▼11.97
Posts /wp-admin/edit.php3.58 ▲0.2255.52 ▲7.03
Add New Post /wp-admin/post-new.php6.01 ▲0.1190.77 ▼0.24
Media Library /wp-admin/upload.php3.36 ▲0.1238.51 ▲2.66
Headline Studio /wp-admin/options-general.php?page=headline-studio-settings3.3234.86

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 57 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Headline Analyzer: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5814.31 ▲0.071.64 ▼0.2137.23 ▼5.97
Dashboard /wp-admin2,210 ▲335.57 ▲0.0393.59 ▼6.9241.03 ▲1.25
Posts /wp-admin/edit.php2,331 ▲22812.75 ▲10.81263.75 ▲219.9033.68 ▼2.92
Add New Post /wp-admin/post-new.php1,714 ▲17922.73 ▲0.10665.72 ▼16.6629.68 ▼26.99
Media Library /wp-admin/upload.php1,415 ▲154.26 ▼0.0191.73 ▼28.7045.31 ▼3.73
Headline Studio /wp-admin/options-general.php?page=headline-studio-settings9482.0024.7744.58

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/headline-analyzer/includes/auth/success.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5, #6, #7 in headline-analyzer/assets to your readme.txt
The official readme.txt might help

headline-analyzer/headline-analyzer.php 92% from 13 tests

"Headline Analyzer" version 1.3.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.6" instead of "5.0")

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 plugin2,884 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PHP171743151,033
CSS3700941
JavaScript2014865852
SVG20258

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions56
▷ Named functions5191.07%
▷ Anonymous functions58.93%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.55MB with 0.33MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/GettingStarted.png86.36KB32.53KB▼ 62.33%
assets/img/Team.png187.00KB62.94KB▼ 66.34%
assets/img/ClassicEditor.png55.15KB27.02KB▼ 51.00%
assets/img/PostsPage.png135.38KB59.65KB▼ 55.94%
assets/img/Gutenberg.png95.13KB35.60KB▼ 62.57%