10% e-section

Code Review | E-Section

WordPress plugin E-Section scored10%from 54 tests.

About plugin

  • Plugin page: e-section
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 6.3.1
  • First release: Mar 12, 2012
  • Latest release: Sep 10, 2014
  • Number of updates: 71
  • Update frequency: every 13.4 days
  • Top authors: dkukral (87.32%)Droyal (12.68%)jboydston (2.82%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,484 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/e-section/php/logger.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; logger has a deprecated constructor

Server metrics [RAM: ▼1.85MB] [CPU: ▼53.23ms] Passed 4 tests

Analyzing server-side resources used by E-Section
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.325.21 ▼35.36
Dashboard /wp-admin2.16 ▼1.146.22 ▼42.38
Posts /wp-admin/edit.php2.16 ▼1.206.85 ▼52.14
Add New Post /wp-admin/post-new.php2.16 ▼3.736.07 ▼83.02
Media Library /wp-admin/upload.php2.16 ▼1.078.00 ▼30.39
Additional Sections /wp-admin/admin.php?page=e-section-additional-sections2.166.17
Logger /wp-admin/admin.php?page=e-section-logger2.166.84
Readership Report /wp-admin/admin.php?page=e-section-reader-report2.165.67
Export Posts /wp-admin/admin.php?page=e-section-export-posts2.166.80
Print Tags /wp-admin/admin.php?page=e-section-print-tags2.165.09
E-Section /wp-admin/admin.php?page=e-section2.166.83
GEO Logger /wp-admin/admin.php?page=e-section-geo-logger2.165.74
Edition Planner /wp-admin/admin.php?page=e-section-edition-planner2.166.53

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 33 new files
Database: no new tables, 10 new options
New WordPress options
print_tag_options
widget_recent-comments
theysaidso_admin_options
export_posts_tag
db_upgraded
can_compress_scripts
e_section_db_ver
widget_theysaidso_widget
widget_recent-posts
export_posts_no_posts

Browser metrics Passed 4 tests

Checking browser requirements for E-Section
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,024 ▲26314.75 ▲0.211.84 ▲0.1029.86 ▼15.43
Dashboard /wp-admin2,430 ▲2565.99 ▲0.42101.56 ▲6.4248.94 ▲6.68
Posts /wp-admin/edit.php2,177 ▲772.06 ▲0.0743.07 ▼0.5334.75 ▼2.62
Add New Post /wp-admin/post-new.php6,392 ▲4,86626.27 ▲2.68912.78 ▲200.1061.47 ▲5.19
Media Library /wp-admin/upload.php1,451 ▲574.16 ▼0.00103.35 ▲5.3448.20 ▲8.21
Additional Sections /wp-admin/admin.php?page=e-section-additional-sections1,1852.0530.7938.26
Logger /wp-admin/admin.php?page=e-section-logger8701.7024.6030.92
Readership Report /wp-admin/admin.php?page=e-section-reader-report9351.9130.5634.52
Export Posts /wp-admin/admin.php?page=e-section-export-posts9081.7724.9824.78
Print Tags /wp-admin/admin.php?page=e-section-print-tags2,2591.8729.9026.46
E-Section /wp-admin/admin.php?page=e-section8481.8924.9926.48
GEO Logger /wp-admin/admin.php?page=e-section-geo-logger8581.9024.9532.83
Edition Planner /wp-admin/admin.php?page=e-section-edition-planner9961.9128.9747.02

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/e-section/php/logger.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; logger has a deprecated constructor
  • This plugin does not fully uninstall, leaving 10 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • e_section_db_ver
    • can_compress_scripts
    • widget_theysaidso_widget
    • export_posts_no_posts
    • widget_recent-posts
    • print_tag_options
    • db_upgraded
    • export_posts_tag

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
Smoke test failed, please fix the following
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=e-section-edition-planner
    • > Deprecated in wp-content/plugins/e-section/php/logger.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; logger has a deprecated constructor
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=e-section-edition-planner
    • > Warning in wp-content/plugins/e-section/php/export-posts.php+7
    Declaration of Export_Posts_Walker_Category_Checklist::start_lvl(&$output, $depth, $args) should be compatible with Walker::start_lvl(&$output, $depth = 0, $args = Array)
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=e-section-edition-planner
    • > Warning in wp-content/plugins/e-section/php/export-posts.php+12
    Declaration of Export_Posts_Walker_Category_Checklist::end_lvl(&$output, $depth, $args) should be compatible with Walker::end_lvl(&$output, $depth = 0, $args = Array)
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=e-section-edition-planner
    • > Warning in wp-content/plugins/e-section/php/export-posts.php+17
    Declaration of Export_Posts_Walker_Category_Checklist::start_el(&$output, $category, $depth, $args) should be compatible with Walker::start_el(&$output, $data_object, $depth = 0, $args = Array, $current_object_id = 0)
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=e-section-edition-planner
    • > Warning in wp-content/plugins/e-section/php/export-posts.php+38
    Declaration of Export_Posts_Walker_Category_Checklist::end_el(&$output, $category, $depth, $args) should be compatible with Walker::end_el(&$output, $data_object, $depth = 0, $args = Array)
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=e-section-edition-planner
    • > User notice in wp-includes/functions.php+5905
    Function is_single was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=e-section-edition-planner
    • > Warning in wp-content/plugins/e-section/php/page-planner.php+26
    Use of undefined constant COLUMN_INCHES_OPTION - assumed 'COLUMN_INCHES_OPTION' (this will throw an Error in a future version of PHP)
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=e-section-edition-planner
    • > Notice in wp-content/plugins/e-section/php/page-planner.php+27
    Trying to access array offset on value of type bool
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=e-section-edition-planner
    • > Notice in wp-content/plugins/e-section/php/page-planner.php+28
    Undefined variable: words_inches
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=e-section-edition-planner
    • > Warning in wp-content/plugins/e-section/php/page-planner.php+28
    count(): Parameter must be an array or an object that implements Countable
    • > GET request to /wp-admin/admin.php?page=e-section-logger
    • > Notice in wp-content/plugins/e-section/php/logger.php+97
    Undefined index: interval
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=e-section-edition-planner
    • > Notice in wp-content/plugins/e-section/php/page-planner.php+321
    Undefined index: date
    • > GET request to /wp-admin/admin.php?page=e-section-export-posts
    • > Notice in wp-content/plugins/e-section/php/export-posts.php+320
    Undefined index: category
    • > GET request to /wp-admin/admin.php?page=e-section-export-posts
    • > Notice in wp-content/plugins/e-section/php/export-posts.php+320
    Undefined index: status
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=e-section-export-posts
    • > Notice in wp-content/plugins/e-section/php/export-posts.php+336
    Undefined index: keyword
    • > GET request to /wp-admin/admin.php?page=e-section-export-posts
    • > Notice in wp-content/plugins/e-section/php/export-posts.php+320
    Undefined index: tag
    • > GET request to /wp-admin/admin.php?page=e-section-export-posts
    • > Notice in wp-content/plugins/e-section/php/export-posts.php+320
    Undefined index: post_category
    • > GET request to /wp-admin/admin.php?page=e-section-edition-planner
    • > Notice in wp-content/plugins/e-section/php/page-planner.php+134
    Undefined variable: custom_statuses
    • > GET request to /wp-admin/admin.php?page=e-section-edition-planner
    • > Warning in wp-content/plugins/e-section/php/page-planner.php+134
    Invalid argument supplied for foreach()

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
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/e-section/php/reader_report.php
    • > /wp-content/plugins/e-section/php/clear-print-tags.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/e-section/e-section.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Walker' not found in wp-content/plugins/e-section/php/export-posts.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

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 need to be fixed:
  • Screenshots: A description for screenshot #2 is missing in e-section/assets to your readme.txt
Please take inspiration from this readme.txt

e-section/e-section.php Passed 13 tests

"E-Section" version 2.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
49 characters long description:
Allows you to manage your posts by section / page

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin3,412 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP124522162,662
CSS24961481
JavaScript337337269

PHP code Passed 2 tests

Analyzing 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.28
Average class complexity33.80
▷ Minimum class complexity6.00
▷ Maximum class complexity77.00
Average method complexity5.37
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods76
▷ Static methods00.00%
▷ Public methods76100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants763.64%
▷ Class constants436.36%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
13 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/smoothness/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
css/smoothness/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
css/smoothness/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
css/smoothness/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%