84% advanced-excerpt

Code Review | Advanced Excerpt

WordPress plugin Advanced Excerpt scored84%from 54 tests.

About plugin

  • Plugin page: advanced-excerpt
  • Plugin version: 4.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-6.1
  • WordPress version: 6.3.1
  • First release: Aug 28, 2007
  • Latest release: Feb 1, 2023
  • Number of updates: 112
  • Update frequency: every 50.3 days
  • Top authors: wpkube (46.43%)basvd (34.82%)FancyThemes (10.71%)aprea (8.04%)bradt (3.57%)

Code review

54 tests

User reviews

96 reviews

Install metrics

90,000+ active /1,404,118 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

This is a short check of server-side resources used by Advanced Excerpt
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.68 ▼2.85
Dashboard /wp-admin3.32 ▲0.0244.14 ▼5.17
Posts /wp-admin/edit.php3.37 ▲0.0243.59 ▲0.23
Add New Post /wp-admin/post-new.php5.90 ▲0.0293.63 ▲8.23
Media Library /wp-admin/upload.php3.24 ▲0.0136.08 ▲2.76
Excerpt /wp-admin/options-general.php?page=advanced-excerpt3.3231.04

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
advanced_excerpt
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Excerpt
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.18 ▼1.201.89 ▼0.0242.47 ▼3.17
Dashboard /wp-admin2,207 ▲195.84 ▼0.0294.95 ▼23.6641.46 ▼2.61
Posts /wp-admin/edit.php2,093 ▲42.01 ▲0.0237.72 ▲2.1234.39 ▲0.36
Add New Post /wp-admin/post-new.php1,536 ▲323.15 ▼0.04676.48 ▲34.6649.89 ▼3.05
Media Library /wp-admin/upload.php1,392 ▲104.21 ▲0.04111.71 ▲6.4447.76 ▲2.61
Excerpt /wp-admin/options-general.php?page=advanced-excerpt2,2691.9226.6248.83

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/advanced-excerpt/functions/functions.php:96
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/advanced-excerpt/template/options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/advanced-excerpt/template/sidebar.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-excerpt/advanced-excerpt.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: excerpt, formatting, post, post excerpt, content

advanced-excerpt/advanced-excerpt.php Passed 13 tests

The main file in "Advanced Excerpt" v. 4.4.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
49 characters long description:
Control the appearance of WordPress post excerpts

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin937 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP613875729
CSS100125
JavaScript214683

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity91.00
▷ Minimum class complexity91.00
▷ Maximum class complexity91.00
Average method complexity7.00
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin