78% friendlycase

Code Review | FriendlyCase

WordPress plugin FriendlyCase scored78%from 54 tests.

About plugin

  • Plugin page: friendlycase
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.0
  • WordPress version: 6.3.1
  • First release: Jan 8, 2012
  • Latest release: Sep 16, 2014
  • Number of updates: 31
  • Update frequency: every 31.7 days
  • Top authors: kelter (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /3,302 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.36MB] [CPU: ▼19.08ms] Passed 4 tests

Server-side resources used by FriendlyCase
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.42 ▼0.0437.82 ▼3.68
Dashboard /wp-admin3.24 ▼0.0641.40 ▼13.50
Posts /wp-admin/edit.php3.28 ▼0.0840.52 ▼9.72
Add New Post /wp-admin/post-new.php4.60 ▼1.2845.03 ▼49.42
Media Library /wp-admin/upload.php3.23 ▲0.0138.96 ▲4.18
FriendlyCase Settings /wp-admin/options-general.php?page=friendlycase_options3.1831.01

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for FriendlyCase
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5813.65 ▼1.141.79 ▼0.3042.30 ▼6.88
Dashboard /wp-admin2,228 ▲254.83 ▼1.0799.52 ▼4.6640.10 ▲1.06
Posts /wp-admin/edit.php2,104 ▲41.99 ▼0.0238.13 ▲2.1935.23 ▼2.05
Add New Post /wp-admin/post-new.php1,548 ▲1323.34 ▲0.13661.12 ▼13.6253.51 ▲8.07
Media Library /wp-admin/upload.php1,404 ▲74.19 ▼0.09100.71 ▲0.8041.79 ▼1.44
FriendlyCase Settings /wp-admin/options-general.php?page=friendlycase_options9101.9925.4554.93

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=friendlycase_options
    • > Warning in wp-content/plugins/friendlycase/friendlycase.php+96
    Use of undefined constant fc_text_lc - assumed 'fc_text_lc' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=friendlycase_options
    • > Warning in wp-content/plugins/friendlycase/friendlycase.php+97
    Use of undefined constant fc_text_uc - assumed 'fc_text_uc' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=friendlycase_options
    • > Warning in wp-content/plugins/friendlycase/friendlycase.php+98
    Use of undefined constant fc_text_ig - assumed 'fc_text_ig' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=friendlycase_options
    • > Warning in wp-content/plugins/friendlycase/friendlycase.php+99
    Use of undefined constant fc_wrappit - assumed 'fc_wrappit' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=friendlycase_options
    • > Warning in wp-content/plugins/friendlycase/friendlycase.php+100
    Use of undefined constant fc_firstonly - assumed 'fc_firstonly' (this will throw an Error in a future version of PHP)

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/friendlycase/friendlycase.php:40

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Screenshot #1 (Options panel showing User entered words, css styling and sentence case option.) image missing
The official readme.txt might help

friendlycase/friendlycase.php Passed 13 tests

The main PHP script in "FriendlyCase" version 1.0.7 is automatically included on every request by WordPress
96 characters long description:
Enable Friendly, User-Definable Word Capitalization and Sentence Casing in Post and Page Titles.

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 detected103 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1139103

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.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
1 PNG file occupies 0.10MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png99.02KB31.51KB▼ 68.18%