88% easy-accordion-posts

Code Review | Easy Accordion Posts

WordPress plugin Easy Accordion Posts scored 88% from 54 tests.

About plugin

  • Plugin page: easy-accordion-posts
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.5.0
  • WordPress version: 5.8.1
  • First release: Apr 1, 2016
  • Latest release: May 3, 2016
  • Number of updates: 13
  • Update frequency: every 2.5 days
  • Top authors: noideaboy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,244 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.14MB] [CPU: ▼143.53ms] Passed 4 tests

A check of server-side resources used by Easy Accordion Posts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.98 ▲0.1540.84 ▲6.35
Dashboard /wp-admin3.20 ▲0.1548.95 ▼1.58
Posts /wp-admin/edit.php3.31 ▲0.2149.36 ▲1.23
Add New Post /wp-admin/post-new.php5.56 ▲0.1394.63 ▼575.44
Media Library /wp-admin/upload.php3.15 ▲0.1434.66 ▲1.68

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 61 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Accordion Posts
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,827 ▲22116.58 ▲1.1012.53 ▲3.1050.70 ▲3.56
Dashboard /wp-admin3,007 ▲736.06 ▲0.11143.80 ▼3.43115.09 ▼4.36
Posts /wp-admin/edit.php2,754 ▲152.69 ▼0.0171.98 ▲2.3095.16 ▼5.41
Add New Post /wp-admin/post-new.php1,508 ▼17518.86 ▲0.18371.56 ▼32.42110.86 ▼3.92
Media Library /wp-admin/upload.php1,825 ▲155.01 ▼0.01153.56 ▼8.17117.32 ▼9.73

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

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
The following issues need your attention
  • 7× PHP files output text when accessed directly:
    • > /wp-content/plugins/easy-accordion-posts/admin/partials/angular-templates/add-cell.php
    • > /wp-content/plugins/easy-accordion-posts/admin/partials/angular-templates/resp.php
    • > /wp-content/plugins/easy-accordion-posts/public/partials/easy-accordion-posts-public-display.php
    • > /wp-content/plugins/easy-accordion-posts/admin/partials/angular-templates/warning.php
    • > /wp-content/plugins/easy-accordion-posts/admin/partials/angular-templates/database-table.php
    • > /wp-content/plugins/easy-accordion-posts/admin/partials/angular-templates/cell.php
    • > /wp-content/plugins/easy-accordion-posts/admin/partials/angular-templates/starter-notes.php
  • 13× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_permalink() in wp-content/plugins/easy-accordion-posts/public/templates/product/product-info.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_permalink() in wp-content/plugins/easy-accordion-posts/public/templates/product/product-buttons.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_excerpt() in wp-content/plugins/easy-accordion-posts/public/templates/product/product-short-description.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_permalink() in wp-content/plugins/easy-accordion-posts/public/templates/employee/employee-info.php:14
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_average_rating() on null in wp-content/plugins/easy-accordion-posts/public/templates/product/product-review.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/easy-accordion-posts/public/templates/product/product-stats.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_permalink() in wp-content/plugins/easy-accordion-posts/public/templates/blog/blog-read-more-button.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/easy-accordion-posts/public/templates/employee/employee-career-highlights.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/easy-accordion-posts/public/templates/example.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_excerpt() in wp-content/plugins/easy-accordion-posts/public/templates/employee/employee-bio-summary.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots require images: #5 (Super Hero Stats), #6 (Admin Page (Partial Screen Shot))
  • Donate link: Please fix this invalid url: ""
You can look at the official readme.txt

easy-accordion-posts/easy-accordion-posts.php Passed 13 tests

The entry point to "Easy Accordion Posts" version 1.1.0 is a PHP file that has certain tags in its header comment area
80 characters long description:
Display your posts as accordions (in a grid) using simple and intuitive options.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin17,191 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript112,71516,06212,163
CSS5205573,062
PHP302727111,311
SVG100655

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity16.14
▷ Minimum class complexity1.00
▷ Maximum class complexity92.00
Average method complexity3.79
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods38
▷ Static methods25.26%
▷ Public methods3386.84%
▷ Protected methods00.00%
▷ Private methods513.16%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/images/eap_rating_stars.png14.76KB0.55KB▼ 96.24%