84% limit-post-titles

Code Review | Limit Post Titles

WordPress plugin Limit Post Titles scored84%from 54 tests.

About plugin

  • Plugin page: limit-post-titles
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.2
  • WordPress version: 6.3.1
  • First release: Apr 4, 2015
  • Latest release: Jul 27, 2015
  • Number of updates: 11
  • Update frequency: every 10.5 days
  • Top authors: steve228uk (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

1,000+ active /15,852 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.00MB] [CPU: ▼13.57ms] Passed 4 tests

Analyzing server-side resources used by Limit Post Titles
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.88 ▲5.06
Dashboard /wp-admin3.32 ▼0.0344.01 ▼13.57
Posts /wp-admin/edit.php3.37 ▲0.0142.58 ▼18.86
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.29 ▼21.74
Media Library /wp-admin/upload.php3.24 ▲0.0132.85 ▼0.12
Limit Post Titles /wp-admin/options-general.php?page=sr_limiter3.2330.04

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Limit Post Titles: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲5813.68 ▼1.085.02 ▲3.0844.73 ▲3.33
Dashboard /wp-admin2,207 ▲585.84 ▲0.2497.44 ▲2.6937.58 ▼6.23
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0137.94 ▼3.7031.02 ▼3.03
Add New Post /wp-admin/post-new.php1,536 ▲1423.08 ▼0.04657.44 ▲44.8560.36 ▲8.68
Media Library /wp-admin/upload.php1,395 ▲74.24 ▼0.0498.75 ▲2.5341.32 ▼1.00
Limit Post Titles /wp-admin/options-general.php?page=sr_limiter8552.0323.4427.35

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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 did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/limit-post-titles/limit-post-titles.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/limit-post-titles/settings.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 Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: limit, limiter, posts, cms, dashboard...

limit-post-titles/limit-post-titles.php Passed 13 tests

The main PHP file in "Limit Post Titles" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
43 characters long description:
Limit post titles using JS in the dashboard

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected158 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP2154381
JavaScript23459
CSS22618

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected