68% ninja-tables

Code Review | Ninja Tables - Best Data Table Plugin for WordPress

WordPress plugin Ninja Tables - Best Data Table Plugin for WordPress scored68%from 54 tests.

About plugin

  • Plugin page: ninja-tables
  • Plugin version: 5.0.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Oct 6, 2017
  • Latest release: Oct 4, 2023
  • Number of updates: 131
  • Update frequency: every 16.7 days
  • Top authors: techjewel (73.28%)adreastrian (22.9%)csesumonpro (5.34%)

Code review

54 tests

User reviews

400 reviews

Install metrics

80,000+ active /1,514,189 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
Install script ran successfully

Server metrics [RAM: ▲0.28MB] [CPU: ▼1.87ms] Passed 4 tests

An overview of server-side resources used by Ninja Tables - Best Data Table Plugin for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2941.75 ▲2.85
Dashboard /wp-admin3.58 ▲0.2844.38 ▼3.40
Posts /wp-admin/edit.php3.63 ▲0.2844.96 ▼1.02
Add New Post /wp-admin/post-new.php6.30 ▲0.4286.34 ▼5.92
Media Library /wp-admin/upload.php3.50 ▲0.2833.54 ▲2.99

Server storage [IO: ▲7.64MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 320 new files
Database: 1 new table, 9 new options
New tables
wp_ninja_table_items
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
_ninja_tables_plugin_suggest_dismiss
_ninja_tables_settings_migration
widget_theysaidso_widget
db_upgraded
_ninja_tables_sorting_migration

Browser metrics Passed 4 tests

Checking browser requirements for Ninja Tables - Best Data Table Plugin for WordPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲17513.44 ▼0.861.71 ▲0.0544.61 ▲2.53
Dashboard /wp-admin2,314 ▲1235.83 ▲0.93100.28 ▲0.7338.26 ▼7.19
Posts /wp-admin/edit.php2,199 ▲1132.04 ▲0.0233.99 ▼3.1732.92 ▼1.51
Add New Post /wp-admin/post-new.php6,391 ▲4,85627.79 ▲4.93894.94 ▲228.4539.99 ▼17.16
Media Library /wp-admin/upload.php1,501 ▲1104.23 ▲0.0295.65 ▼3.6444.05 ▲0.04
Charts /wp-admin/admin.php?page=ninja_tables#/charts1,94620.78522.9775.35
Tables /wp-admin/admin.php?page=ninja_tables#/home1,6029.54227.0141.43
Tools /wp-admin/admin.php?page=ninja_tables#/tools1,7439.72100.3051.66
Help /wp-admin/admin.php?page=ninja_tables#/help1,73010.1094.8937.63

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_ninja_table_items
  • The uninstall procedure has failed, leaving 9 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • _ninja_tables_plugin_suggest_dismiss
    • _ninja_tables_settings_migration
    • _ninja_tables_sorting_migration
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/ninja-tables/app/Views/admin/menu.php
  • 113× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'NinjaTables\\Framework\\Database\\Query\\Grammar' not found in wp-content/plugins/ninja-tables/vendor/wpfluent/framework/src/WPFluent/Database/Query/MySqlGrammar.php:10
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin-install.php): failed to open stream: No such file or directory in wp-content/plugins/ninja-tables/app/Services/AjaxInstaller.php on line 6
    • > PHP Fatal error
      Uncaught Error: Interface 'NinjaTables\\Framework\\Database\\ConnectionResolverInterface' not found in wp-content/plugins/ninja-tables/vendor/wpfluent/framework/src/WPFluent/Database/ConnectionResolver.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'NinjaTables\\Framework\\Database\\Orm\\Relations\\Relation' not found in wp-content/plugins/ninja-tables/vendor/wpfluent/framework/src/WPFluent/Database/Orm/Relations/BelongsTo.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'NinjaTables\\Framework\\Database\\Query\\Expression' not found in wp-content/plugins/ninja-tables/vendor/wpfluent/framework/src/WPFluent/Database/Query/JsonExpression.php:8
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin-install.php): failed to open stream: No such file or directory in wp-content/plugins/ninja-tables/app/Services/PluginInstaller.php on line 8
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ninja-tables/app/Services/AutomaticUpgrader.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'NinjaTables\\Framework\\Database\\BaseGrammar' not found in wp-content/plugins/ninja-tables/vendor/wpfluent/framework/src/WPFluent/Database/Query/Grammar.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'NinjaTables\\Framework\\Support\\ArrayableInterface' not found in wp-content/plugins/ninja-tables/vendor/wpfluent/framework/src/WPFluent/Support/Collection.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'NinjaTables\\Framework\\Pagination\\AbstractPaginator' not found in wp-content/plugins/ninja-tables/vendor/wpfluent/framework/src/WPFluent/Pagination/LengthAwarePaginator.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: You are using too many tags: 24 tag instead of maximum 10
You can take inspiration from this readme.txt

ninja-tables/ninja-tables.php 92% from 13 tests

The primary PHP file in "Ninja Tables - Best Data Table Plugin for WordPress" version 5.0.4 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 146 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin53,587 lines of code in 253 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript183,6903,98626,850
PHP1935,45812,41522,244
PO File61,3441,5222,922
CSS1228471,228
JSON400279
SVG191163
Markdown1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity13.13
▷ Minimum class complexity1.00
▷ Maximum class complexity187.00
Average method complexity2.01
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces35
Interfaces16
Traits18
Classes129
▷ Abstract classes129.30%
▷ Concrete classes11790.70%
▷ Final classes00.00%
Methods1,906
▷ Static methods24412.80%
▷ Public methods1,49978.65%
▷ Protected methods36619.20%
▷ Private methods412.15%
Functions182
▷ Named functions4323.63%
▷ Anonymous functions13976.37%
Constants13
▷ Global constants646.15%
▷ Class constants753.85%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
10 PNG files occupy 0.35MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/heart.png2.00KB1.92KB▼ 4.06%
assets/img/banner_premium.png196.67KB72.31KB▼ 63.23%
assets/img/ninja-table-editor-button-2x.png15.15KB3.67KB▼ 75.81%
assets/img/bug.png2.95KB3.09KB0.00%
assets/img/fluent_banner.png42.00KB13.22KB▼ 68.51%