72% wp-basics

Code Review | WP-Basics

WordPress plugin WP-Basics scored72%from 54 tests.

About plugin

  • Plugin page: wp-basics
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8
  • WordPress version: 6.3.1
  • First release: Jan 5, 2014
  • Latest release: Mar 11, 2014
  • Number of updates: 30
  • Update frequency: every 2.2 days
  • Top authors: laura20 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,665 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.19MB] [CPU: ▼3.86ms] Passed 4 tests

A check of server-side resources used by WP-Basics
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1641.69 ▲0.65
Dashboard /wp-admin3.55 ▲0.2448.67 ▼0.97
Posts /wp-admin/edit.php3.60 ▲0.2449.60 ▲1.05
Add New Post /wp-admin/post-new.php6.07 ▲0.1886.85 ▼16.15
Media Library /wp-admin/upload.php3.42 ▲0.1936.61 ▲4.93
Custom CSS /wp-admin/admin.php?page=wp_basics&tab=63.4241.43
Import / Export /wp-admin/admin.php?page=wp_basics&tab=import_export_default3.4236.28
Post Pagination /wp-admin/admin.php?page=wp_basics&tab=23.4235.44
Author info /wp-admin/admin.php?page=wp_basics&tab=43.4234.42
Social Buttons /wp-admin/admin.php?page=wp_basics&tab=53.4230.96
Breadcrumbs /wp-admin/admin.php?page=wp_basics&tab=03.4232.57
Related Content /wp-admin/admin.php?page=wp_basics&tab=33.4235.23
Pagination /wp-admin/admin.php?page=wp_basics&tab=13.4235.29

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 356 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
widget_recent-comments
wpb_opt
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
redux-framework-tracking

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP-Basics
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,113 ▲37815.53 ▲1.1387.29 ▲85.5744.59 ▲1.43
Dashboard /wp-admin2,294 ▲1064.86 ▲0.01100.09 ▼16.9041.21 ▼3.44
Posts /wp-admin/edit.php2,177 ▲882.01 ▲0.0436.90 ▼2.4735.57 ▼2.38
Add New Post /wp-admin/post-new.php1,603 ▲6023.51 ▲4.92683.77 ▲48.3852.23 ▼2.97
Media Library /wp-admin/upload.php1,476 ▲914.24 ▲0.1097.43 ▼2.1541.64 ▼3.76
Custom CSS /wp-admin/admin.php?page=wp_basics&tab=62,1074.7985.0939.29
Import / Export /wp-admin/admin.php?page=wp_basics&tab=import_export_default2,1104.7574.3130.74
Post Pagination /wp-admin/admin.php?page=wp_basics&tab=22,1134.7661.7930.18
Author info /wp-admin/admin.php?page=wp_basics&tab=42,1104.7561.5730.11
Social Buttons /wp-admin/admin.php?page=wp_basics&tab=52,1074.8069.4129.61
Breadcrumbs /wp-admin/admin.php?page=wp_basics&tab=02,1104.8262.9832.55
Related Content /wp-admin/admin.php?page=wp_basics&tab=32,1134.7562.3431.26
Pagination /wp-admin/admin.php?page=wp_basics&tab=12,1134.7662.6230.73

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 8 options in the database
    • wpb_opt
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • redux-framework-tracking
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 56 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_basics&tab=1
    • > Warning in wp-content/plugins/wp-basics/ReduxFramework/ReduxCore/framework.php+2694
    A non-numeric value encountered

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 21× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-basics/WP-Basics.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'ReduxFramework' not found in wp-content/plugins/wp-basics/ReduxFramework/ReduxCore/inc/validation/url/validation_url.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'ReduxFramework' not found in wp-content/plugins/wp-basics/ReduxFramework/ReduxCore/inc/validation/numeric/validation_numeric.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'ReduxFramework' not found in wp-content/plugins/wp-basics/ReduxFramework/ReduxCore/inc/validation/str_replace/validation_str_replace.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'ReduxFramework' not found in wp-content/plugins/wp-basics/ReduxFramework/ReduxCore/inc/validation/html/validation_html.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'ReduxFramework' not found in wp-content/plugins/wp-basics/ReduxFramework/ReduxCore/inc/validation/email_not_empty/validation_email_not_empty.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'ReduxFramework' not found in wp-content/plugins/wp-basics/ReduxFramework/ReduxCore/inc/validation/preg_replace/validation_preg_replace.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'ReduxFramework' not found in wp-content/plugins/wp-basics/ReduxFramework/ReduxCore/inc/validation/color/validation_color.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-basics/ReduxFramework/ReduxCore/inc/fields/select/elusive-icons.php:309
    • > PHP Fatal error
      Uncaught Error: Class 'ReduxFramework' not found in wp-content/plugins/wp-basics/ReduxFramework/ReduxCore/inc/validation/email/validation_email.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_basics&tab=1
    • > Javascript (severe) in unknown
    /wp-content/plugins/wp-basics/ReduxFramework/ReduxCore/assets/js/redux.min.js?ver=1394531542 1:21385 Uncaught TypeError: Cannot read properties of undefined (reading 'msie')

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: social sharing, pagination, breadcrumbs, author info, related content...

wp-basics/WP-Basics.php 92% from 13 tests

The entry point to "WP-Basics" version 2.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-basics.php" instead of "WP-Basics.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
Everything looks great! No dangerous files found in this plugin28,815 lines of code in 284 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1192,2232,08010,175
PHP702,8704,2699,149
CSS376353274,984
LESS26222432,979
Sass24301,057
SVG100309
Markdown228064
Bourne Shell121052
JSON30045
HTML1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity30.85
▷ Minimum class complexity1.00
▷ Maximum class complexity587.00
Average method complexity7.10
▷ Minimum method complexity1.00
▷ Maximum method complexity95.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes61
▷ Abstract classes00.00%
▷ Concrete classes61100.00%
▷ Final classes00.00%
Methods299
▷ Static methods51.67%
▷ Public methods29297.66%
▷ Protected methods00.00%
▷ Private methods72.34%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
33 PNG files occupy 0.13MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ReduxFramework/ReduxCore/assets/img/3cl.png3.08KB0.33KB▼ 89.13%
ReduxFramework/ReduxCore/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_888888_256x240.png4.27KB4.11KB▼ 3.78%
ReduxFramework/ReduxCore/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
ReduxFramework/ReduxCore/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
ReduxFramework/ReduxCore/assets/img/3cm.png2.96KB0.29KB▼ 90.35%