83% dai-pho-keywords-generator

Code Review | Dai Pho Keywords Generator

WordPress plugin Dai Pho Keywords Generator scored 83% from 54 tests.

About plugin

  • Plugin page: dai-pho-keywords-...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 6.3.1
  • First release: Sep 26, 2016
  • Latest release: Jan 2, 2017
  • Number of updates: 9
  • Update frequency: every 11.3 days
  • Top authors: congchivo99 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 967 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

This is a short check of server-side resources used by Dai Pho Keywords Generator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.02 ▼2.80
Dashboard /wp-admin3.31 ▲0.0147.38 ▲1.26
Posts /wp-admin/edit.php3.36 ▲0.0144.26 ▼0.63
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.64 ▲2.65
Media Library /wp-admin/upload.php3.23 ▲0.0135.04 ▼1.10
Dai Pho Keyword Setting /wp-admin/options-general.php?page=daipho_keyword_setting3.2031.11

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Dai Pho Keywords Generator: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9614.74 ▲0.372.17 ▲0.4143.54 ▼3.48
Dashboard /wp-admin2,213 ▲225.85 ▼0.0394.98 ▼7.2240.56 ▼0.17
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0540.06 ▲5.8036.85 ▼0.37
Add New Post /wp-admin/post-new.php1,517 ▼2517.89 ▼5.52645.49 ▼37.5756.28 ▲7.40
Media Library /wp-admin/upload.php1,392 ▲44.14 ▼0.0692.95 ▼12.7641.56 ▼3.30
Dai Pho Keyword Setting /wp-admin/options-general.php?page=daipho_keyword_setting7962.0223.0925.21

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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 no errors were found, this is by no means 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 trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/dai-pho-keywords-generator/daipho-keyword.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === dai-pho-keywords-generator === )
The official readme.txt might help

dai-pho-keywords-generator/daipho-keyword.php 85% from 13 tests

The main file in "Dai Pho Keywords Generator" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 209 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("dai-pho-keywords-generator.php" instead of "daipho-keyword.php")

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 plugin77 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1111077

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected