84% posts-navigation-links-for-sections-and-headings-free-by-wp-masters

Code Review | Posts Navigation Links for Sections and Headings - Free by WP Masters

WordPress plugin Posts Navigation Links for Sections and Headings - Free by WP Masters scored84%from 54 tests.

About plugin

  • Plugin page: posts-navigation-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Aug 2, 2022
  • Latest release: Aug 2, 2022
  • Number of updates: 4
  • Update frequency: every 59.8 days
  • Top authors: wpmasterscom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /287 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.05MB] [CPU: ▼14.56ms] Passed 4 tests

Analyzing server-side resources used by Posts Navigation Links for Sections and Headings - Free by WP Masters
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2537.72 ▲2.39
Dashboard /wp-admin3.64 ▲0.3345.83 ▼0.80
Posts /wp-admin/edit.php3.69 ▲0.3348.33 ▼2.29
Add New Post /wp-admin/post-new.php4.86 ▼1.0244.67 ▼57.54
Media Library /wp-admin/upload.php3.50 ▲0.2738.38 ▲5.19

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Posts Navigation Links for Sections and Headings - Free by WP Masters
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲17415.93 ▲1.346.48 ▲4.6642.06 ▼1.10
Dashboard /wp-admin2,240 ▲526.66 ▲1.75126.10 ▲20.5441.44 ▼0.92
Posts /wp-admin/edit.php2,126 ▲344.09 ▲2.0451.10 ▲9.0936.95 ▲0.90
Add New Post /wp-admin/post-new.php6,321 ▲4,77927.73 ▲9.26918.55 ▲295.5637.53 ▼18.18
Media Library /wp-admin/upload.php1,422 ▲406.71 ▲2.52119.01 ▲23.9346.03 ▲1.59

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/posts-navigation-links-for-sections-and-headings-free-by-wp-masters/templates/admin/settings.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/posts-navigation-links-for-sections-and-headings-free-by-wp-masters/wpm-post-navigation-links.php:18

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

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: seo links content, title links, anchor title, smooth scroll to title, content links

posts-navigation-links-for-sections-and-headings-free-by-wp-masters/wpm-post-navigation-links.php 85% from 13 tests

The principal PHP file in "Posts Navigation Links for Sections and Headings - Free by WP Masters" v. 1.0.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("posts-navigation-links-for-sections-and-headings-free-by-wp-masters.php" instead of "wpm-post-navigation-links.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
Good job! No executable or dangerous file extensions detected15,127 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
SVG3009,552
JavaScript53312062,154
PHP43823502,025
CSS5194311,396

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity131.67
▷ Minimum class complexity8.00
▷ Maximum class complexity249.00
Average method complexity5.04
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods98
▷ Static methods11.02%
▷ Public methods8384.69%
▷ Protected methods1515.31%
▷ Private methods00.00%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants23
▷ Global constants23100.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.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
templates/assets/img/logo.png11.32KB4.55KB▼ 59.79%