84% headlineengine

Code Review | HeadlineEngine

WordPress plugin HeadlineEngine scored84%from 54 tests.

About plugin

  • Plugin page: headlineengine
  • Plugin version: 0.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8.0-6.0
  • WordPress version: 6.3.1
  • First release: Jul 12, 2022
  • Latest release: Jul 22, 2022
  • Number of updates: 4
  • Update frequency: every 3.8 days
  • Top authors: jasonny (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /244 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼0.74MB] [CPU: ▼24.45ms] Passed 4 tests

This is a short check of server-side resources used by HeadlineEngine
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.25 ▼2.85
Dashboard /wp-admin3.11 ▼0.1928.67 ▼25.09
Posts /wp-admin/edit.php3.25 ▼0.1135.08 ▼11.01
Add New Post /wp-admin/post-new.php3.24 ▼2.6540.62 ▼56.46
Media Library /wp-admin/upload.php3.20 ▼0.0329.06 ▼5.24

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

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

Browser metrics Passed 4 tests

HeadlineEngine: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲9313.29 ▼1.191.78 ▼0.2348.54 ▲4.75
Dashboard /wp-admin2,256 ▲684.89 ▼1.00109.61 ▼7.6136.66 ▼9.67
Posts /wp-admin/edit.php2,139 ▲502.01 ▼0.1340.50 ▲6.2835.11 ▲0.03
Add New Post /wp-admin/post-new.php1,543 ▲2923.23 ▲5.65665.08 ▼30.2856.48 ▼0.32
Media Library /wp-admin/upload.php1,441 ▲564.24 ▲0.0495.10 ▼7.4440.96 ▼2.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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/headlineengine/includes/admin/views/settings.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Requires at least: Version not formatted correctly
You can take inspiration from this readme.txt

headlineengine/headlineengine.php 92% from 13 tests

Analyzing the main PHP file in "HeadlineEngine" version 0.2.0
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 158 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin3,928 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript32544403,541
PHP62216268
CSS210195
Markdown19010
SVG1009
JSON1005

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity4.50
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1285.71%
▷ Protected methods00.00%
▷ Private methods214.29%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.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
There were not PNG files found in your plugin