83% excerpts-for-pages

Code Review | Excerpts for Pages

WordPress plugin Excerpts for Pages scored83%from 54 tests.

About plugin

  • Plugin page: excerpts-for-pages
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-3.6
  • WordPress version: 6.3.1
  • First release: Jun 22, 2013
  • Latest release: Apr 18, 2017
  • Number of updates: 11
  • Update frequency: every 126.9 days
  • Top authors: boluda (90.91%)unitepress (18.18%)

Code review

54 tests

User reviews

4 reviews

Install metrics

800+ active /6,991 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
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.56ms] Passed 4 tests

This is a short check of server-side resources used by Excerpts for Pages
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.77 ▼8.25
Dashboard /wp-admin3.31 ▲0.0146.81 ▼3.15
Posts /wp-admin/edit.php3.36 ▲0.0051.12 ▼5.04
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.87 ▼8.02
Media Library /wp-admin/upload.php3.23 ▲0.0033.37 ▼4.93

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Excerpts for Pages
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.48 ▲0.201.79 ▼0.2439.53 ▼4.29
Dashboard /wp-admin2,221 ▲154.81 ▼0.07101.55 ▲1.4537.96 ▼5.96
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0640.78 ▼0.3234.20 ▼3.63
Add New Post /wp-admin/post-new.php1,545 ▲1423.17 ▼0.32600.74 ▼42.1251.25 ▼4.43
Media Library /wp-admin/upload.php1,403 ▲34.23 ▲0.01101.95 ▼4.2043.13 ▲1.83

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/excerpts-for-pages/excerpts-for-pages.php:31

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === excerpts-for-pages === )
You can look at the official readme.txt

excerpts-for-pages/excerpts-for-pages.php 85% from 13 tests

The main PHP script in "Excerpts for Pages" version 1.6 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: The domain path folder was not found ("/lang")

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 plugin5 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12245

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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 are no PNG files in this plugin