79% summy

Code Review | Summy: Excerpt Extraction

WordPress plugin Summy: Excerpt Extraction scored79%from 54 tests.

About plugin

  • Plugin page: summy
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-3.8
  • WordPress version: 6.3.1
  • First release: Feb 6, 2013
  • Latest release: Dec 15, 2013
  • Number of updates: 19
  • Update frequency: every 16.4 days
  • Top authors: chr15 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /3,295 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.75ms] Passed 4 tests

Analyzing server-side resources used by Summy: Excerpt Extraction
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0238.88 ▼2.58
Dashboard /wp-admin3.32 ▲0.0146.43 ▼4.19
Posts /wp-admin/edit.php3.37 ▲0.0144.18 ▼11.24
Add New Post /wp-admin/post-new.php5.92 ▲0.0386.95 ▼9.00
Media Library /wp-admin/upload.php3.24 ▲0.0137.21 ▲3.30

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
summy
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Summy: Excerpt Extraction: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.24 ▼1.131.78 ▲0.1438.87 ▼11.66
Dashboard /wp-admin2,209 ▲244.87 ▼0.94107.10 ▼2.6538.87 ▼6.88
Posts /wp-admin/edit.php2,089 ▼32.03 ▲0.0634.53 ▼7.6934.92 ▼0.20
Add New Post /wp-admin/post-new.php6,431 ▲4,91726.05 ▲8.43926.84 ▲282.7768.56 ▲20.17
Media Library /wp-admin/upload.php1,391 ▲94.23 ▲0.09100.85 ▼4.1743.56 ▼3.08

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

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
Everything seems fine, however this is by no means an exhaustive test

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
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/summy/inc/setup.php
    • > /wp-content/plugins/summy/summy.php
    • > /wp-content/plugins/summy/inc/ui.php
    • > /wp-content/plugins/summy/inc/backend.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Summy\\Filter\\StopWords' not found in wp-content/plugins/summy/lib/Summy/Filter/Gr/StopWords.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Summy\\Filter\\StopWords' not found in wp-content/plugins/summy/lib/Summy/Filter/En/StopWords.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: summary, extraction, excerpt, generation, auto

summy/summy.php Passed 13 tests

The principal PHP file in "Summy: Excerpt Extraction" v. 1.0.3 is loaded by WordPress automatically on each request
113 characters long description:
Summy can generate excerpts for your posts by applying various algorithms for automatic summarization extraction.

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 plugin2,690 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP162506062,475
PO File26364182
JavaScript22533
HTML1100

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity19.91
▷ Minimum class complexity1.00
▷ Maximum class complexity87.00
Average method complexity6.07
▷ Minimum method complexity1.00
▷ Maximum method complexity64.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes11
▷ Abstract classes19.09%
▷ Concrete classes1090.91%
▷ Final classes00.00%
Methods41
▷ Static methods1229.27%
▷ Public methods3073.17%
▷ Protected methods12.44%
▷ Private methods1024.39%
Functions8
▷ Named functions337.50%
▷ Anonymous functions562.50%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin