84% show-more-p2

Code Review | Show More for P2

WordPress plugin Show More for P2 scored84%from 54 tests.

About plugin

  • Plugin page: show-more-p2
  • Plugin version: 1.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.3-4.7
  • WordPress version: 6.3.1
  • First release: Jun 29, 2016
  • Latest release: Jul 21, 2016
  • Number of updates: 18
  • Update frequency: every 9.2 days
  • Top authors: kylesureline (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,119 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

This is a short check of server-side resources used by Show More for P2
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0048.78 ▲5.87
Dashboard /wp-admin3.31 ▲0.0047.83 ▼3.77
Posts /wp-admin/edit.php3.36 ▲0.0047.36 ▲1.75
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.73 ▼19.89
Media Library /wp-admin/upload.php3.23 ▲0.0034.07 ▲1.85

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

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

Browser metrics Passed 4 tests

Show More for P2: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.31 ▼1.062.04 ▲0.2944.27 ▲0.21
Dashboard /wp-admin2,209 ▲185.84 ▲0.9393.76 ▼11.5438.18 ▼4.22
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0132.91 ▼3.0136.69 ▲3.15
Add New Post /wp-admin/post-new.php1,538 ▲823.41 ▲5.41675.63 ▲49.1352.28 ▼2.64
Media Library /wp-admin/upload.php1,391 ▲64.24 ▲0.0596.51 ▼2.8842.25 ▼5.75

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 did not uninstall successfully, 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 errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/show-more-p2/show-more-p2.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: more, p2, excerpt, show

show-more-p2/show-more-p2.php Passed 13 tests

The entry point to "Show More for P2" version 1.3.3 is a PHP file that has certain tags in its header comment area
74 characters long description:
Automatically minimizes posts and adds a more link to display them inline.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin147 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1137129
PHP141818

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 1.10MB with 0.78MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-4.png101.08KB29.91KB▼ 70.41%
assets/screenshot-5.png566.55KB177.19KB▼ 68.72%
assets/screenshot-2.png38.02KB11.25KB▼ 70.40%
assets/screenshot-1.png313.28KB85.91KB▼ 72.58%
assets/screenshot-3.png104.07KB26.82KB▼ 74.22%