83% focus-keywords-pro

Code Review | Focus Keywords Pro

WordPress plugin Focus Keywords Pro scored83%from 54 tests.

About plugin

  • Plugin page: focus-keywords-pro
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 6, 2021
  • Latest release: Aug 6, 2021
  • Number of updates: 12
  • Update frequency: every 0.6 days
  • Top authors: crawlcenter (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /435 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.78ms] Passed 4 tests

Analyzing server-side resources used by Focus Keywords Pro
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.89 ▼6.58
Dashboard /wp-admin3.31 ▲0.0146.50 ▼2.56
Posts /wp-admin/edit.php3.36 ▲0.0148.64 ▼2.54
Add New Post /wp-admin/post-new.php5.90 ▲0.0196.10 ▲0.77
Media Library /wp-admin/upload.php3.23 ▲0.0135.07 ▲0.58

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Focus Keywords Pro
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9214.48 ▲0.102.19 ▼0.3538.14 ▼10.82
Dashboard /wp-admin2,208 ▲204.86 ▼0.24107.89 ▲4.0043.70 ▼0.39
Posts /wp-admin/edit.php2,091 ▲21.98 ▼0.0139.46 ▼3.6234.20 ▼0.04
Add New Post /wp-admin/post-new.php6,295 ▲4,76022.40 ▼0.68931.78 ▲230.4371.02 ▲19.11
Media Library /wp-admin/upload.php1,390 ▼14.24 ▲0.05111.94 ▲12.8247.34 ▲4.42

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/focus-keywords-pro/index.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === focus-keywords-pro === )
  • Screenshots: Please describe screenshot #1 in focus-keywords-pro/assets to your readme.txt
The official readme.txt is a good inspiration

focus-keywords-pro/index.php 92% from 13 tests

The main PHP file in "Focus Keywords Pro" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("focus-keywords-pro.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin192 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP22012118
CSS16441
JavaScript15033

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin