77% take-the-lead

Code Review | Take the Lead

WordPress plugin Take the Lead scored 77% from 54 tests.

About plugin

  • Plugin page: take-the-lead
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Dec 20, 2019
  • Latest release: Jul 28, 2023
  • Number of updates: 9
  • Update frequency: every 146.2 days
  • Top authors: aerin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 979 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▲0.68ms] Passed 4 tests

Server-side resources used by Take the Lead
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1638.25 ▼1.84
Dashboard /wp-admin3.55 ▲0.2454.43 ▲10.16
Posts /wp-admin/edit.php3.66 ▲0.3155.57 ▲6.41
Add New Post /wp-admin/post-new.php6.13 ▲0.2482.59 ▼4.68
Media Library /wp-admin/upload.php3.45 ▲0.2238.79 ▲2.84
Take the Lead /wp-admin/options-general.php?page=take-the-lead/settings.php3.4634.14

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Take the Lead
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,087 ▲35215.45 ▲0.799.30 ▲7.2738.01 ▼12.73
Dashboard /wp-admin2,370 ▲1826.72 ▲1.83141.52 ▲41.6947.21 ▲3.28
Posts /wp-admin/edit.php2,285 ▲1933.94 ▲1.9855.64 ▲16.6136.64 ▲2.64
Add New Post /wp-admin/post-new.php6,623 ▲5,09524.38 ▲1.54885.75 ▲206.6139.10 ▼17.67
Media Library /wp-admin/upload.php1,428 ▲404.46 ▲0.3285.78 ▼16.7340.52 ▼3.16
Take the Lead /wp-admin/options-general.php?page=take-the-lead/settings.php3,1754.83103.5367.83

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=take-the-lead/settings.php
    • > Notice in wp-content/plugins/take-the-lead/settings.php+364
    Undefined index: required
    • > GET request to /wp-admin/options-general.php?page=take-the-lead/settings.php
    • > Notice in wp-content/plugins/take-the-lead/settings.php+185
    Undefined index:
    • > GET request to /wp-admin/options-general.php?page=take-the-lead/settings.php
    • > Notice in wp-content/plugins/take-the-lead/settings.php+185
    Trying to access array offset on value of type null

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
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/take-the-lead/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/take-the-lead/takethelead.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Contributors: No tags were detected
  • Contributors: Plugin contributors field is missing
The official readme.txt is a good inspiration

take-the-lead/takethelead.php 77% from 13 tests

The primary PHP file in "Take the Lead" version 1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("take-the-lead.php" instead of "takethelead.php")
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin1,790 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP3266631,065
CSS25620366
JavaScript415036359

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.39
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%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/sortable.png1.00KB0.20KB▼ 79.69%