68% b-productiv-lite

Code Review | B-Productiv Lite

WordPress plugin B-Productiv Lite scored68%from 54 tests.

About plugin

  • Plugin page: b-productiv-lite
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.6
  • WordPress version: 6.3.1
  • First release: Jul 3, 2018
  • Latest release: Jul 4, 2018
  • Number of updates: 18
  • Update frequency: every 2.6 days
  • Top authors: calettso (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /764 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼14.16ms] Passed 4 tests

An overview of server-side resources used by B-Productiv Lite
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1241.60 ▼6.23
Dashboard /wp-admin3.43 ▲0.0852.37 ▼20.79
Posts /wp-admin/edit.php3.48 ▲0.1251.51 ▼6.72
Add New Post /wp-admin/post-new.php6.01 ▲0.1287.70 ▼22.89
Media Library /wp-admin/upload.php3.35 ▲0.1239.48 ▲0.10

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 79 new files
Database: 4 new tables, 11 new options
New tables
wp_bproductiv_error_msg
wp_bproductiv_tasks
wp_bproductiv_calendar
wp_bproductiv_user_info
New WordPress options
can_compress_scripts
calendar_database_bproductiv_lite_version
tasks_database_bproductiv_lite_version
widget_recent-comments
hclpage
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
error_msg_database_bproductiv_lite_version
...

Browser metrics Passed 4 tests

B-Productiv Lite: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.26 ▼0.301.91 ▲0.2143.94 ▲0.32
Dashboard /wp-admin2,214 ▲375.64 ▲0.0392.19 ▲3.2537.11 ▼0.09
Posts /wp-admin/edit.php2,119 ▲192.03 ▲0.0939.91 ▲2.4536.59 ▲0.33
Add New Post /wp-admin/post-new.php1,539 ▲1323.09 ▼0.19660.01 ▼16.8653.20 ▼7.33
Media Library /wp-admin/upload.php1,416 ▲194.23 ▲0.1096.69 ▼7.6543.93 ▼1.49

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie tables were found after uninstall: 3 tables
    • wp_bproductiv_user_info
    • wp_bproductiv_calendar
    • wp_bproductiv_tasks
  • This plugin does not fully uninstall, leaving 10 options in the database
    • hclpage
    • theysaidso_admin_options
    • widget_recent-comments
    • user_info_database_bproductiv_lite_version
    • can_compress_scripts
    • calendar_database_bproductiv_lite_version
    • db_upgraded
    • tasks_database_bproductiv_lite_version
    • widget_theysaidso_widget
    • widget_recent-posts

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 everything seems fine, this is not 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
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/b-productiv-lite/templates/cl_forbidden.php
  • 113× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/b-productiv-lite/templates/calendar/insert_calendar.php:32
    • > PHP Warning
      Use of undefined constant B_PRODUCTIV_PLUGIN_PATH - assumed 'B_PRODUCTIV_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/b-productiv-lite/templates/associates/cl_team_member_update.php on line 114
    • > PHP Fatal error
      require_once(): Failed opening required 'B_PRODUCTIV_PLUGIN_PATHtemplates/cl_access_denied.php' (include_path='.:/usr/share/php') in wp-content/plugins/b-productiv-lite/templates/associates/cl_pass_change2.php on line 117
    • > PHP Warning
      require_once(B_PRODUCTIV_PLUGIN_PATHtemplates/cl_static_database.php): failed to open stream: No such file or directory in wp-content/plugins/b-productiv-lite/templates/login/cl_reset_password.php on line 40
    • > PHP Warning
      Use of undefined constant B_PRODUCTIV_PLUGIN_PATH - assumed 'B_PRODUCTIV_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/b-productiv-lite/templates/tasks/cl_todo_main.php on line 52
    • > PHP Notice
      Undefined index: timer in wp-content/plugins/b-productiv-lite/templates/calendar/cl_calendar_main2.php on line 32
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/b-productiv-lite/templates/cl_dropdown_menus.php on line 37
    • > PHP Notice
      Undefined index: timer in wp-content/plugins/b-productiv-lite/templates/associates/cl_team_member_update2.php on line 32
    • > PHP Notice
      Undefined index: _wpnonce in wp-content/plugins/b-productiv-lite/templates/calendar/cl_calendar_delete2.php on line 32
    • > PHP Warning
      require_once(B_PRODUCTIV_PLUGIN_PATHtemplates/cl_access_denied.php): failed to open stream: No such file or directory in wp-content/plugins/b-productiv-lite/templates/calendar/cl_calendar_add2.php on line 147

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 Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: small business, efficiency, telecommute, tasks, productivity...

b-productiv-lite/b-productiv.php 85% from 13 tests

This is the main PHP file of "B-Productiv Lite" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 354 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("b-productiv-lite.php" instead of "b-productiv.php")

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 plugin3,630 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
PHP423731,3773,477
CSS130143
HTML10010

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants13100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
16 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icons/high_hot.png1.39KB1.28KB▼ 8.09%
icons/Home.png0.95KB0.76KB▼ 19.82%
icons/password_key.png1.79KB1.23KB▼ 30.85%
icons/access_denied.png3.38KB2.18KB▼ 35.69%
icons/logout_Lock.png1.14KB1.03KB▼ 10.15%