78% page-title-splitter

Code Review | Page Title Splitter

WordPress plugin Page Title Splitter scored78%from 54 tests.

About plugin

  • Plugin page: page-title-splitter
  • Plugin version: 2.5.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: May 20, 2016
  • Latest release: Aug 28, 2023
  • Number of updates: 57
  • Update frequency: every 46.6 days
  • Top authors: 15km (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

2,000+ active /30,092 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.12MB] [CPU: ▲1.32ms] Passed 4 tests

Analyzing server-side resources used by Page Title Splitter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1248.08 ▲8.68
Dashboard /wp-admin3.41 ▲0.1149.08 ▼3.70
Posts /wp-admin/edit.php3.52 ▲0.1745.64 ▼4.31
Add New Post /wp-admin/post-new.php6.01 ▲0.1394.26 ▲10.00
Media Library /wp-admin/upload.php3.33 ▲0.1138.86 ▲4.61
Page Title Splitter /wp-admin/options-general.php?page=pt_splitter3.2833.02

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

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

Browser metrics Passed 4 tests

Page Title Splitter: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.30 ▲0.161.68 ▼0.1343.18 ▼0.01
Dashboard /wp-admin2,199 ▲225.63 ▲0.0285.09 ▼13.6638.86 ▼3.45
Posts /wp-admin/edit.php2,104 ▲41.98 ▲0.0435.22 ▼3.7735.89 ▲2.61
Add New Post /wp-admin/post-new.php1,544 ▲1618.32 ▼4.89672.34 ▼25.1672.84 ▲11.75
Media Library /wp-admin/upload.php1,407 ▲74.07 ▼0.11106.12 ▼2.6246.56 ▲0.87
Page Title Splitter /wp-admin/options-general.php?page=pt_splitter1,1902.1324.7438.15

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • 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 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=pt_splitter
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=pt_splitter
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/page-title-splitter/class/pts-woocommerce.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/page-title-splitter/pts.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_title() in wp-content/plugins/page-title-splitter/includes/woocommerce/single-product/title.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === page-title-splitter === )
You can look at the official readme.txt

page-title-splitter/pts.php 92% from 13 tests

The primary PHP file in "Page Title Splitter" version 2.5.8 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("page-title-splitter.php" instead of "pts.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 detected738 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP34317546
JavaScript1176170
CSS15020
SVG2002

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods150.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions30
▷ Named functions30100.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 were not PNG files found in your plugin