78% default-text

Code Review | Wordpress Default Text

WordPress plugin Wordpress Default Text scored 78% from 54 tests.

About plugin

  • Plugin page: default-text
  • Plugin version: 1.04
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8.1
  • WordPress version: 6.3.1
  • First release: Mar 2, 2014
  • Latest release: Mar 3, 2014
  • Number of updates: 13
  • Update frequency: every 0.2 days
  • Top authors: jkalawe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,696 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.70MB] [CPU: ▼18.19ms] Passed 4 tests

Analyzing server-side resources used by Wordpress Default Text
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.46 ▼4.87
Dashboard /wp-admin3.28 ▼0.0342.16 ▼9.23
Posts /wp-admin/edit.php3.30 ▼0.0644.41 ▼1.22
Add New Post /wp-admin/post-new.php3.16 ▼2.7235.95 ▼57.42
Media Library /wp-admin/upload.php3.25 ▲0.0336.61 ▲2.71
Default Text /wp-admin/options-general.php?page=options-default-text3.1931.61

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Wordpress Default Text
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.25 ▼1.301.82 ▲0.1140.23 ▼11.37
Dashboard /wp-admin2,213 ▲254.85 ▼1.00106.53 ▼7.9336.32 ▼13.68
Posts /wp-admin/edit.php2,096 ▲72.06 ▲0.0539.67 ▲2.3434.77 ▼0.34
Add New Post /wp-admin/post-new.php1,517 ▲317.63 ▲0.08674.37 ▲31.8258.26 ▲7.91
Media Library /wp-admin/upload.php1,395 ▲44.29 ▲0.1095.05 ▼7.9041.31 ▼2.62
Default Text /wp-admin/options-general.php?page=options-default-text8672.0622.4127.22

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • 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
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=options-default-text
    • > Warning in wp-content/plugins/default-text/default-text.php+85
    Use of undefined constant default_text_gemini - assumed 'default_text_gemini' (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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/default-text/settings.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/default-text/settings.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Animated demo of functionality including use of custom variables.), #2 (Settings view in it's entirety.)
The official readme.txt is a good inspiration

default-text/default-text.php Passed 13 tests

The main file in "Wordpress Default Text" v. 1.04 serves as a complement to information provided in readme.txt and as the entry point to the plugin
48 characters long description:
Insert text defaults for new post title and body

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin143 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24858143

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin