68% kahanit-wp-fw

Code Review | Kahanit WP FW

WordPress plugin Kahanit WP FW scored 68% from 54 tests.

About plugin

  • Plugin page: kahanit-wp-fw
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5
  • WordPress version: 5.8.1
  • First release: Nov 26, 2012
  • Latest release: Dec 4, 2012
  • Number of updates: 15
  • Update frequency: every 0.5 days
  • Top authors: kahanit (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 821 total downloads

Benchmarks

Plugin footprint 65% 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.84MB] [CPU: ▼173.49ms] Passed 4 tests

An overview of server-side resources used by Kahanit WP FW
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.01 ▲1.2948.04 ▲19.79
Dashboard /wp-admin4.24 ▲1.1959.22 ▲12.31
Posts /wp-admin/edit.php4.29 ▲1.1956.86 ▲7.14
Add New Post /wp-admin/post-new.php5.23 ▼0.2163.91 ▼724.84
Media Library /wp-admin/upload.php4.19 ▲1.1844.68 ▲11.42

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 554 new files
Database: 7 new tables, 2 new options
New tables
wp_kwf_options_pages
wp_kwf_taxonomies
wp_kwf_forms
wp_kwf_types
wp_kwf_sidebars
wp_kwf_form_fields
wp_kwf_metaboxes
New WordPress options
kwf_db_version
kwf_version

Browser metrics Passed 4 tests

Kahanit WP FW: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,724 ▲12916.37 ▲0.8410.43 ▼0.0451.01 ▼2.92
Dashboard /wp-admin2,984 ▲475.90 ▼0.04143.66 ▼21.24148.46 ▲20.98
Posts /wp-admin/edit.php2,761 ▲222.59 ▼0.1262.81 ▼6.10105.43 ▲6.52
Add New Post /wp-admin/post-new.php1,698 ▲1518.35 ▼0.39398.57 ▼17.79131.77 ▲18.52
Media Library /wp-admin/upload.php1,843 ▲365.02 ▼0.02143.56 ▼17.52151.40 ▲28.41

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 tables in the database
    • wp_kwf_form_fields
    • wp_kwf_forms
    • wp_kwf_sidebars
    • wp_kwf_taxonomies
    • wp_kwf_types
    • wp_kwf_metaboxes
    • wp_kwf_options_pages
  • The uninstall procedure has failed, leaving 2 options in the database
    • kwf_version
    • kwf_db_version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/kahanit-wp-fw/public/js/options-pages/ext-init.php
    • > /wp-content/plugins/kahanit-wp-fw/admin/views/manage/view-manage.php
    • > /wp-content/plugins/kahanit-wp-fw/public/js/manage/ext-init.php
    • > /wp-content/plugins/kahanit-wp-fw/kahanit-wp-fw.php
    • > /wp-content/plugins/kahanit-wp-fw/public/js/metaboxes/ext-init.php
  • 220× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'Zend/Db.php' (include_path='.:/usr/share/php') in wp-content/plugins/kahanit-wp-fw/library/Zend/Db/Table/Row/Abstract.php on line 26
    • > PHP Warning
      require_once(Zend/Db/Statement/Exception.php): failed to open stream: No such file or directory in wp-content/plugins/kahanit-wp-fw/library/Zend/Db/Statement/Mysqli/Exception.php on line 26
    • > PHP Warning
      require_once(Zend/Json/Server/Response.php): failed to open stream: No such file or directory in wp-content/plugins/kahanit-wp-fw/library/Zend/Json/Server/Response/Http.php on line 25
    • > PHP Warning
      require_once(Zend/Db.php): failed to open stream: No such file or directory in wp-content/plugins/kahanit-wp-fw/library/Zend/Db/Table/Row/Abstract.php on line 26
    • > PHP Warning
      require_once(Zend/Db/Adapter/Pdo/Abstract.php): failed to open stream: No such file or directory in wp-content/plugins/kahanit-wp-fw/library/Zend/Db/Adapter/Pdo/Pgsql.php on line 27
    • > PHP Warning
      require_once(Zend/Db/Adapter/Abstract.php): failed to open stream: No such file or directory in wp-content/plugins/kahanit-wp-fw/library/Zend/Db/Adapter/Mysqli.php on line 27
    • > PHP Warning
      require_once(Zend/Db/Statement/Pdo.php): failed to open stream: No such file or directory in wp-content/plugins/kahanit-wp-fw/library/Zend/Db/Statement/Pdo/Ibm.php on line 26
    • > PHP Warning
      require_once(Zend/Db/Table/Exception.php): failed to open stream: No such file or directory in wp-content/plugins/kahanit-wp-fw/library/Zend/Db/Table/Rowset/Exception.php on line 26
    • > PHP Fatal error
      require_once(): Failed opening required 'Zend/Db/Adapter/Abstract.php' (include_path='.:/usr/share/php') in wp-content/plugins/kahanit-wp-fw/library/Zend/Db/Adapter/Oracle.php on line 26
    • > PHP Warning
      require_once(Zend/Db/Adapter/Pdo/Abstract.php): failed to open stream: No such file or directory in wp-content/plugins/kahanit-wp-fw/library/Zend/Db/Adapter/Pdo/Sqlite.php on line 27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% 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
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (Post types list), #2 (Edit post type), #3 (Taxonomies list), #4 (Edit taxonomies), #5 (Sidebars list), #6 (Edit sidebar), #7 (Options pages list), #8 (Edit options page), #9 (Metaboxes list), #10 (Edit metabox), #11 (Forms list), #12 (Edit forms)
Please take inspiration from this readme.txt

kahanit-wp-fw/kahanit-wp-fw.php Passed 13 tests

The principal PHP file in "Kahanit WP FW" v. 1.0.3 is loaded by WordPress automatically on each request
112 characters long description:
Easily create post types, taxonomies, sidebars, metaboxes, options pages, forms for metaboxes and options pages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin27,124 lines of code in 158 files:
LanguageFilesBlank linesComment linesLines of code
PHP1524,51618,47120,139
CSS2671,9736,720
JavaScript46714265

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity22.72
▷ Minimum class complexity1.00
▷ Maximum class complexity161.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces8
Traits0
Classes140
▷ Abstract classes1712.14%
▷ Concrete classes12387.86%
▷ Final classes00.00%
Methods1,581
▷ Static methods925.82%
▷ Public methods1,37586.97%
▷ Protected methods20012.65%
▷ Private methods60.38%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants205
▷ Global constants125.85%
▷ Class constants19394.15%
▷ Public constants193100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
33 PNG files occupy 0.21MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png22.05KB11.95KB▼ 45.80%
public/js/extjs/resources/themes/images/gray/datepicker/datepicker-footer-bg.png0.32KB0.23KB▼ 28.96%
screenshot-10.png22.41KB10.35KB▼ 53.81%
public/js/extjs/resources/themes/images/gray/slider/slider-v-thumb.png0.62KB0.50KB▼ 18.35%
screenshot-5.png12.50KB6.09KB▼ 51.25%