10% wp-loop

Code Review | Wp Loop

WordPress plugin Wp Loop scored10%from 54 tests.

About plugin

  • Plugin page: wp-loop
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.5.2
  • WordPress version: 6.3.1
  • First release: Oct 21, 2015
  • Latest release: Jun 10, 2016
  • Number of updates: 28
  • Update frequency: every 20.8 days
  • Top authors: mimothemes (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80+ active /3,928 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/wp-loop/wp-loop.php+422
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼54.64ms] Passed 4 tests

An overview of server-side resources used by Wp Loop
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.40 ▼36.16
Dashboard /wp-admin2.05 ▼1.266.32 ▼42.01
Posts /wp-admin/edit.php2.05 ▼1.315.18 ▼42.79
Add New Post /wp-admin/post-new.php2.05 ▼3.845.32 ▼97.58
Media Library /wp-admin/upload.php2.05 ▼1.184.65 ▼30.01

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_wploop
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Wp Loop: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.17 ▼1.214.48 ▲2.8042.99 ▼1.36
Dashboard /wp-admin2,210 ▲225.88 ▼0.03101.05 ▼0.8239.39 ▼4.18
Posts /wp-admin/edit.php2,093 ▲42.03 ▼0.0238.13 ▼2.4533.46 ▼1.26
Add New Post /wp-admin/post-new.php1,518 ▼123.38 ▲0.19680.59 ▲62.3357.77 ▲6.10
Media Library /wp-admin/upload.php1,392 ▲14.26 ▲0.0394.87 ▼5.0341.95 ▼0.27

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/wp-loop/wp-loop.php+422
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_wploop
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_parse_args() in wp-content/plugins/wp-loop/views/widget.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-loop/views/admin.php:2

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (29 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

wp-loop/wp-loop.php Passed 13 tests

The main PHP script in "Wp Loop" version 1.2.2 is automatically included on every request by WordPress
67 characters long description:
Create a loop of posts, pages or whatever Custom Post Type you have

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
Good job! No executable or dangerous file extensions detected792 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP4171117477
CSS33810142
JavaScript5132799
PO File1282874

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity37.00
▷ Minimum class complexity37.00
▷ Maximum class complexity37.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods211.11%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin