78% nexter-extension

Code Review | Nexter Extension

WordPress plugin Nexter Extension scored78%from 54 tests.

About plugin

  • Plugin page: nexter-extension
  • Plugin version: 3.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Mar 12, 2021
  • Latest release: Nov 30, 2023
  • Number of updates: 30
  • Update frequency: every 33.2 days
  • Top authors: posimyththemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /14,411 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲2.49MB] [CPU: ▲18.01ms] 75% from 4 tests

A check of server-side resources used by Nexter Extension
The following require your attention
  • CPU: Try to keep total CPU usage under 500.00ms (currently 749.08ms on /wp-admin/themes.php?page=nexter_settings_welcome)
PageMemory (MB)CPU Time (ms)
Home /5.49 ▲2.0253.13 ▲14.29
Dashboard /wp-admin5.99 ▲2.6570.62 ▲13.20
Posts /wp-admin/edit.php6.01 ▲2.6677.87 ▲35.27
Add New Post /wp-admin/post-new.php8.55 ▲2.66107.45 ▲16.06
Media Library /wp-admin/upload.php5.87 ▲2.6459.26 ▲28.50
Nexter Settings /wp-admin/themes.php?page=nexter_settings_welcome6.82749.08

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 580 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Nexter Extension
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,000 ▲25314.87 ▲0.162.04 ▲0.2338.69 ▼4.95
Dashboard /wp-admin2,398 ▲2206.71 ▲0.99129.52 ▲15.8644.77 ▲0.82
Posts /wp-admin/edit.php2,332 ▲2324.06 ▲2.0661.05 ▲26.2937.04 ▲6.59
Add New Post /wp-admin/post-new.php1,594 ▲6823.33 ▼0.42581.20 ▼70.7532.76 ▼25.51
Media Library /wp-admin/upload.php1,458 ▲644.77 ▲0.5089.34 ▼10.7843.24 ▼0.11
Nexter Settings /wp-admin/themes.php?page=nexter_settings_welcome1,7573.6753.5661.51

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

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=nexter_settings_welcome
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 65× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/nexter-extension/include/nexter-template/nexter-post-type-compatibility.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/nexter-extension/include/custom-options/metabox/includes/types/CMB2_Type_Picker_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_REST_Controller_Boxes' not found in wp-content/plugins/nexter-extension/include/custom-options/metabox/includes/rest-api/CMB2_REST_Controller_Fields.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Counter_Base' not found in wp-content/plugins/nexter-extension/include/custom-options/metabox/includes/types/CMB2_Type_Text.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/nexter-extension/include/custom-options/metabox/includes/types/CMB2_Type_Oembed.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nexter-extension/include/custom-options/module/nexter-display-conditional-rules.php:97
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup' not found in wp-content/plugins/nexter-extension/include/custom-options/metabox/includes/CMB2_Options_Hookup.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/nexter-extension/include/panel-settings/extensions/nexter-ext-post-duplicator.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cmb2_dir() in wp-content/plugins/nexter-extension/include/custom-options/metabox/includes/rest-api/CMB2_REST_Controller.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nexter-extension/include/custom-options/nexter-sections-settings.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
No plugin tags provided

nexter-extension/nexter-extension.php 92% from 13 tests

The primary PHP file in "Nexter Extension" version 3.1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected97,296 lines of code in 414 files:
LanguageFilesBlank linesComment linesLines of code
PO File12014,31518,50232,323
JavaScript565,23915,69226,570
PHP1054,4778,14319,291
CSS283881,30310,295
XML42645616,776
Sass17306291,411
SVG8400630

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
The following items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 122)
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity32.89
▷ Minimum class complexity1.00
▷ Maximum class complexity310.00
Average method complexity4.70
▷ Minimum method complexity1.00
▷ Maximum method complexity122.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes119
▷ Abstract classes97.56%
▷ Concrete classes11092.44%
▷ Final classes00.00%
Methods989
▷ Static methods21321.54%
▷ Public methods87588.47%
▷ Protected methods919.20%
▷ Private methods232.33%
Functions137
▷ Named functions9569.34%
▷ Anonymous functions4230.66%
Constants26
▷ Global constants1350.00%
▷ Class constants1350.00%
▷ Public constants13100.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
17 PNG files occupy 0.22MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/activate.png127.01KB62.91KB▼ 50.46%
include/custom-options/metabox/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%
include/custom-options/metabox/images/ico-delete.png0.70KB0.72KB0.00%
include/custom-options/metabox/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
assets/images/blockquote.png1.50KB0.49KB▼ 67.16%