78% definitions-internal-linkbuilding

Code Review | Definitions - Internal Linkbuilding

WordPress plugin Definitions - Internal Linkbuilding scored78%from 54 tests.

About plugin

  • Plugin page: definitions-inter...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0
  • WordPress version: 6.3.1
  • First release: May 26, 2021
  • Latest release: May 6, 2022
  • Number of updates: 9
  • Update frequency: every 38.3 days
  • Top authors: RogierLankhorst (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,482 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.50ms] Passed 4 tests

Server-side resources used by Definitions - Internal Linkbuilding
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1637.78 ▼2.19
Dashboard /wp-admin3.51 ▲0.2054.04 ▲2.10
Posts /wp-admin/edit.php3.62 ▲0.2654.78 ▲10.64
Add New Post /wp-admin/post-new.php5.40 ▼0.4968.62 ▼28.53
Media Library /wp-admin/upload.php3.43 ▲0.2042.60 ▲12.16
Definitions /wp-admin/edit-tags.php?taxonomy=definitions_title3.4240.45

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 45 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
rspdef_activation_time
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Definitions - Internal Linkbuilding
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲14413.66 ▼0.745.33 ▲3.5142.50 ▼4.90
Dashboard /wp-admin2,210 ▲254.84 ▼0.03108.99 ▼6.8641.05 ▼5.17
Posts /wp-admin/edit.php2,136 ▲472.01 ▲0.0240.73 ▲3.8136.44 ▼2.02
Add New Post /wp-admin/post-new.php6,331 ▲4,78918.91 ▲0.40902.89 ▲293.5857.01 ▼3.48
Media Library /wp-admin/upload.php1,389 ▲74.19 ▼0.0499.32 ▼4.4342.20 ▲0.25
Definitions /wp-admin/edit-tags.php?taxonomy=definitions_title1,2352.1327.6831.35

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
The following issues need your attention
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/definitions-internal-linkbuilding/definitions.php
    • > /wp-content/plugins/definitions-internal-linkbuilding/text_parser.php
    • > /wp-content/plugins/definitions-internal-linkbuilding/post_type.php
    • > /wp-content/plugins/definitions-internal-linkbuilding/shepherd/tour.php
    • > /wp-content/plugins/definitions-internal-linkbuilding/review.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/definitions-internal-linkbuilding/templates/preview.php:5

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 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: linkbuilding, hyperlinks, tooltips, cool

definitions-internal-linkbuilding/definitions.php 77% from 13 tests

Analyzing the main PHP file in "Definitions - Internal Linkbuilding" version 1.0.2
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("definitions-internal-linkbuilding.php" instead of "definitions.php")
  • Domain Path: The domain path folder does not exist ("/lang")
  • 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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected5,478 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript136622504,008
PHP7203259846
CSS10829388
LESS44115211
Markdown116025

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity19.00
▷ Minimum class complexity7.00
▷ Maximum class complexity33.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods42
▷ Static methods37.14%
▷ Public methods3378.57%
▷ Protected methods00.00%
▷ Private methods921.43%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants8
▷ Global constants8100.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
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
assets/img/s.png0.13KB0.09KB▼ 30.66%