83% wpify-mapy-cz

Code Review | WPify Mapy.cz

WordPress plugin WPify Mapy.cz scored83%from 54 tests.

About plugin

  • Plugin page: wpify-mapy-cz
  • Plugin version: 3.1.2
  • PHP compatiblity: 7.3.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.0-6.2
  • WordPress version: 6.3.1
  • First release: Sep 19, 2020
  • Latest release: Oct 13, 2023
  • Number of updates: 31
  • Update frequency: every 36.1 days
  • Top authors: wpify (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active /4,799 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
This plugin's installer ran successfully

Server metrics [RAM: ▲1.38MB] [CPU: ▲3.21ms] Passed 4 tests

An overview of server-side resources used by WPify Mapy.cz
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.85 ▲1.3946.83 ▲0.49
Dashboard /wp-admin4.69 ▲1.3557.08 ▲1.03
Posts /wp-admin/edit.php4.75 ▲1.3952.71 ▲9.70
Add New Post /wp-admin/post-new.php7.42 ▲1.53100.59 ▲1.63
Media Library /wp-admin/upload.php4.63 ▲1.4046.79 ▲12.59
Maps /wp-admin/edit.php?post_type=wpify_mapycz_map4.6645.65
Mapy.cz /wp-admin/admin.php?page=wpify-mapy-cz4.5338.12
Markers /wp-admin/edit.php?post_type=wpify_mapycz_marker4.6643.80

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 573 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by WPify Mapy.cz
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲13716.46 ▲2.171.50 ▼0.4040.26 ▼5.09
Dashboard /wp-admin2,292 ▲1117.61 ▲1.91212.01 ▲106.8742.21 ▲0.65
Posts /wp-admin/edit.php2,194 ▲946.47 ▲4.4861.89 ▲23.0437.09 ▲1.09
Add New Post /wp-admin/post-new.php6,228 ▲4,69418.89 ▼4.28789.87 ▲130.7239.62 ▼17.29
Media Library /wp-admin/upload.php1,515 ▲1188.33 ▲4.14113.79 ▲13.4143.96 ▼2.02
Maps /wp-admin/edit.php?post_type=wpify_mapycz_map1,1596.4055.3328.96
Mapy.cz /wp-admin/admin.php?page=wpify-mapy-cz9216.1658.7729.76
Markers /wp-admin/edit.php?post_type=wpify_mapycz_marker1,1516.5358.0927.34

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 326× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WpifyMapyCzDeps\\Twig\ode\\Expression\\TestExpression' not found in wp-content/plugins/wpify-mapy-cz/deps/twig/twig/src/Node/Expression/Test/EvenTest.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'WpifyMapyCzDeps\\DI\\Definition\\Resolver\\DefinitionResolver' not found in wp-content/plugins/wpify-mapy-cz/deps/php-di/php-di/src/Definition/Resolver/ResolverDispatcher.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'WpifyMapyCzDeps\\Twig\ode\\Expression\\CallExpression' not found in wp-content/plugins/wpify-mapy-cz/deps/twig/twig/src/Node/Expression/FunctionExpression.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WpifyMapyCzDeps\\Twig\\Sandbox\\SecurityError' not found in wp-content/plugins/wpify-mapy-cz/deps/twig/twig/src/Sandbox/SecurityNotAllowedTagError.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WpifyMapyCzDeps\\Twig\\TokenParser\\AbstractTokenParser' not found in wp-content/plugins/wpify-mapy-cz/deps/twig/twig/src/TokenParser/IncludeTokenParser.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'WpifyMapyCzDeps\\Codeception\\Test\\Unit' not found in wp-content/plugins/wpify-mapy-cz/deps/wpify/model/tests/CategoryTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WpifyMapyCzDeps\\Wpify\\CustomFields\\Implementations\\AbstractPostImplementation' not found in wp-content/plugins/wpify-mapy-cz/deps/wpify/custom-fields/src/Implementations/Taxonomy.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WpifyMapyCzDeps\\Twig\\Error\\Error' not found in wp-content/plugins/wpify-mapy-cz/deps/twig/twig/src/Error/LoaderError.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WpifyMapyCzDeps\\Twig\ode\ode' not found in wp-content/plugins/wpify-mapy-cz/deps/twig/twig/src/Node/DeprecatedNode.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'WpifyMapyCzDeps\\Twig\\Extension\\AbstractExtension' not found in wp-content/plugins/wpify-mapy-cz/deps/twig/twig/src/Extension/StringLoaderExtension.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Main administration screen.), #2 (Maps administration screen.), #3 (Markers administration screen.), #4 (Marker edit screen.), #5 (Map edit screen.), #6 (Gutenberg block in a page edit screen.), #7 (Map how it is shown on the frontend.)
The official readme.txt is a good inspiration

wpify-mapy-cz/wpify-mapy-cz.php 85% from 13 tests

"WPify Mapy.cz" version 3.1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.4" instead of "5.4.0")
  • Requires PHP: Required version does not match the one declared in readme.txt ("7.4" instead of "7.3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected30,756 lines of code in 547 files:
LanguageFilesBlank linesComment linesLines of code
PHP4791,28910,10826,877
Markdown2070201,767
JSON29001,428
JavaScript11642459
PO File17891193
YAML11012
reStructuredText18510
SVG2008
CSS2102
Sass1010

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity8.74
▷ Minimum class complexity1.00
▷ Maximum class complexity318.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces82
Interfaces46
Traits1
Classes398
▷ Abstract classes297.29%
▷ Concrete classes36992.71%
▷ Final classes8021.68%
Methods2,149
▷ Static methods1306.05%
▷ Public methods1,87187.06%
▷ Protected methods1014.70%
▷ Private methods1778.24%
Functions282
▷ Named functions17461.70%
▷ Anonymous functions10838.30%
Constants113
▷ Global constants119.73%
▷ Class constants10290.27%
▷ Public constants9896.08%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.24MB with 0.15MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
deps/wpify/custom-fields/build/images/flags.1952df89.png68.68KB24.74KB▼ 63.98%
deps/wpify/custom-fields/build/images/flags@2x.276410ff.png179.65KB69.58KB▼ 61.27%