74% awesome-headlines-generator-lite-by-optimalplugins

Code Review | Awesome Headlines Generator

WordPress plugin Awesome Headlines Generator scored74%from 54 tests.

About plugin

  • Plugin page: awesome-headlines...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.3.1
  • WordPress version: 6.3.1
  • First release: Dec 14, 2015
  • Latest release: Mar 25, 2016
  • Number of updates: 4
  • Update frequency: every 25.5 days
  • Top authors: optimalplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,408 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.21ms] Passed 4 tests

Analyzing server-side resources used by Awesome Headlines Generator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.94 ▼5.21
Dashboard /wp-admin3.35 ▲0.0447.94 ▼2.86
Posts /wp-admin/edit.php3.46 ▲0.1048.39 ▼4.46
Add New Post /wp-admin/post-new.php5.94 ▲0.0593.00 ▼0.32
Media Library /wp-admin/upload.php3.38 ▲0.1536.54 ▲1.27

Server storage [IO: ▲1.47MB] [DB: ▲0.02MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: 1 new table, 6 new options
New tables
wp_optimal_headline_data
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Awesome Headlines Generator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6114.82 ▲0.371.59 ▼0.2839.43 ▼8.02
Dashboard /wp-admin2,216 ▲254.89 ▲0.0099.68 ▼14.4839.53 ▼8.63
Posts /wp-admin/edit.php2,099 ▲102.03 ▲0.0339.67 ▲4.7036.91 ▲0.85
Add New Post /wp-admin/post-new.php6,267 ▲4,73926.00 ▲2.83879.11 ▲167.6957.34 ▲7.74
Media Library /wp-admin/upload.php1,392 ▲104.17 ▼0.0497.75 ▼2.7441.33 ▼1.11

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_optimal_headline_data
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/awesome-headlines-generator-lite-by-optimalplugins/lib/banner/optimal-banner.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: headlines, file, swipe, blog, title...

awesome-headlines-generator-lite-by-optimalplugins/awesome-headlines-generator.php 92% from 13 tests

The primary PHP file in "Awesome Headlines Generator" version 1.1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("awesome-headlines-generator-lite-by-optimalplugins.php" instead of "awesome-headlines-generator.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected802 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP512656679
JavaScript117966
CSS211057

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity35.33
▷ Minimum class complexity14.00
▷ Maximum class complexity72.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes266.67%
Methods38
▷ Static methods25.26%
▷ Public methods2257.89%
▷ Protected methods00.00%
▷ Private methods1642.11%
Functions0
▷ Named functions00.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
4 PNG files occupy 0.27MB with 0.11MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png135.45KB41.73KB▼ 69.19%
lib/banner/banner-bg.png0.11KB0.13KB0.00%
assets/screenshot-1.png128.01KB49.73KB▼ 61.15%
assets/icon-256x256.png8.81KB5.21KB▼ 40.81%