72% blogfa-templater

Code Review | قالب‌گر بلاگفا

WordPress plugin قالب‌گر بلاگفا scored72%from 54 tests.

About plugin

  • Plugin page: blogfa-templater
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4.1
  • WordPress version: 6.3.1
  • First release: Jan 7, 2012
  • Latest release: Aug 13, 2012
  • Number of updates: 26
  • Update frequency: every 8.4 days
  • Top authors: shazdeh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,257 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.64ms] Passed 4 tests

Analyzing server-side resources used by قالب‌گر بلاگفا
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0534.85 ▼5.29
Dashboard /wp-admin3.36 ▲0.0643.40 ▼4.47
Posts /wp-admin/edit.php3.41 ▲0.0646.61 ▼1.35
Add New Post /wp-admin/post-new.php5.94 ▲0.0694.23 ▼3.44
Media Library /wp-admin/upload.php3.29 ▲0.0636.43 ▲2.24
Blogfa Options /wp-admin/themes.php?page=blogfa-options3.2829.13

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by قالب‌گر بلاگفا
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.60 ▼0.781.72 ▼0.0240.78 ▼4.37
Dashboard /wp-admin2,210 ▲224.86 ▲0.01110.46 ▼0.4244.40 ▲0.31
Posts /wp-admin/edit.php2,096 ▲72.03 ▼0.0239.07 ▼3.5935.43 ▼4.96
Add New Post /wp-admin/post-new.php1,536 ▲822.93 ▲4.39598.66 ▼24.1355.69 ▲5.29
Media Library /wp-admin/upload.php1,395 ▲74.40 ▲0.1995.61 ▼3.6040.61 ▼1.25
Blogfa Options /wp-admin/themes.php?page=blogfa-options9971.7632.4531.52

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/themes.php?page=blogfa-options
    • > 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/themes.php?page=blogfa-options
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/themes.php?page=blogfa-options
    • > Notice in wp-content/plugins/blogfa-templater/views/options.php+11
    Undefined index: enable
    • > GET request to /wp-admin/themes.php?page=blogfa-options
    • > Notice in wp-content/plugins/blogfa-templater/views/options.php+15
    Undefined index: template
    • > GET request to /wp-admin/themes.php?page=blogfa-options
    • > Notice in wp-content/plugins/blogfa-templater/views/options.php+19
    Undefined index: html
    • > GET request to /wp-admin/themes.php?page=blogfa-options
    • > Notice in wp-content/plugins/blogfa-templater/views/options.php+25
    Undefined index: about
    • > GET request to /wp-admin/themes.php?page=blogfa-options
    • > Notice in wp-content/plugins/blogfa-templater/views/options.php+29
    Undefined index: photo
    • > GET request to /wp-admin/themes.php?page=blogfa-options
    • > Notice in wp-content/plugins/blogfa-templater/views/options.php+34
    Undefined index: archive_page
    • > GET request to /wp-admin/themes.php?page=blogfa-options
    • > Notice in wp-content/plugins/blogfa-templater/views/options.php+41
    Undefined index: posts_page
    • > GET request to /wp-admin/themes.php?page=blogfa-options
    • > Notice in wp-content/plugins/blogfa-templater/views/options.php+48
    Undefined index: profile_page
    • > GET request to /wp-admin/themes.php?page=blogfa-options
    • > Notice in wp-content/plugins/blogfa-templater/views/options.php+54
    Undefined index: daily
    • > GET request to /wp-admin/themes.php?page=blogfa-options
    • > Notice in wp-content/plugins/blogfa-templater/views/options.php+60
    Undefined index: links
    • > GET request to /wp-admin/themes.php?page=blogfa-options
    • > Notice in wp-content/plugins/blogfa-templater/views/options.php+65
    Undefined index: custombackgrounds
    • > GET request to /wp-admin/themes.php?page=blogfa-options
    • > Notice in wp-content/plugins/blogfa-templater/views/options.php+69
    Undefined index: postthumbs

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
Almost there! Just fix the following items
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/blogfa-templater/init.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/blogfa-templater/views/options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function post_password_required() in wp-content/plugins/blogfa-templater/theme/comments.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_active_sidebar() in wp-content/plugins/blogfa-templater/theme/sidebar-below-content.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_active_sidebar() in wp-content/plugins/blogfa-templater/theme/sidebar-above-content.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function blogfa_templater_render() in wp-content/plugins/blogfa-templater/theme/index.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/blogfa-templater/theme/functions.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/themes.php?page=blogfa-options
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/blogfa-templater/js/admin.js?ver=6.3.1:4:26)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/themes.php?page=blogfa-options
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: template, theme

blogfa-templater/init.php 92% from 13 tests

"قالب‌گر بلاگفا" version 0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("blogfa-templater.php" instead of "init.php")

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
Success! There were no dangerous files found in this plugin889 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP8110112663
CSS236105
PO File1476199
JavaScript11422

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.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%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin