79% internal-links-generator

Code Review | Internal Links Generator

WordPress plugin Internal Links Generator scored79%from 54 tests.

About plugin

  • Plugin page: internal-links-ge...
  • Plugin version: 3.51
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-3.4
  • WordPress version: 6.3.1
  • First release: Dec 10, 2015
  • Latest release: Feb 20, 2018
  • Number of updates: 38
  • Update frequency: every 21.2 days
  • Top authors: makong (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

500+ active /15,688 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.25MB] [CPU: ▼2.35ms] Passed 4 tests

This is a short check of server-side resources used by Internal Links Generator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2541.31 ▲1.19
Dashboard /wp-admin3.55 ▲0.2551.59 ▼1.42
Posts /wp-admin/edit.php3.67 ▲0.3151.35 ▼0.33
Add New Post /wp-admin/post-new.php6.15 ▲0.2789.26 ▼8.84
Media Library /wp-admin/upload.php3.48 ▲0.2537.89 ▲2.05
Internal Links Generator /wp-admin/options-general.php?page=internal_links_generator3.4233.92

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 22 new files
Database: 1 new table, 7 new options
New tables
wp_internalinks
New WordPress options
can_compress_scripts
widget_theysaidso_widget
ilgen_options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Internal Links Generator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.17 ▼0.111.86 ▼0.1944.48 ▼2.02
Dashboard /wp-admin2,207 ▲335.65 ▲0.0690.80 ▼5.0039.78 ▲1.28
Posts /wp-admin/edit.php2,109 ▲92.01 ▼0.0037.29 ▼0.0733.43 ▼5.63
Add New Post /wp-admin/post-new.php1,546 ▲1818.23 ▼4.87641.21 ▼45.6661.17 ▲12.31
Media Library /wp-admin/upload.php1,415 ▲184.18 ▼0.1598.90 ▼19.3040.89 ▼6.07
Internal Links Generator /wp-admin/options-general.php?page=internal_links_generator8411.6625.4028.50

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=internal_links_generator
    • > Notice in wp-content/plugins/internal-links-generator/settings.php+98
    Undefined index: order
    • > GET request to /wp-admin/options-general.php?page=internal_links_generator
    • > Notice in wp-content/plugins/internal-links-generator/settings.php+99
    Undefined index: filter

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/internal-links-generator/templates/bugfixer.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/internal-links-generator/templates/keywords.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/internal-links-generator/templates/links.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/internal-links-generator/templates/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/internal-links-generator/templates/impex.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/internal-links-generator/templates/grab.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/internal-links-generator/templates/stat.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/internal-links-generator/templates/asearch.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/internal-links-generator/internal-links-generator.php:73

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: seo, custom, link, internal links, keywords

internal-links-generator/internal-links-generator.php Passed 13 tests

The principal PHP file in "Internal Links Generator" v. 3.51 is loaded by WordPress automatically on each request
112 characters long description:
Simple way to automatically link a certain word or phrase in your post/page/custom content to a URL you specify.

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 detected2,165 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP11244211,717
CSS1190335
JavaScript2130113

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.69
Average class complexity138.50
▷ Minimum class complexity4.00
▷ Maximum class complexity273.00
Average method complexity6.85
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods47
▷ Static methods24.26%
▷ Public methods47100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/arrows.png2.83KB0.15KB▼ 94.62%
images/donate.png12.84KB4.25KB▼ 66.86%
images/delete.png0.64KB0.39KB▼ 38.56%
images/plus.png2.84KB0.19KB▼ 93.22%
images/edit.png0.50KB0.26KB▼ 47.28%